|
As of October 27th, please open all new issues in the Red Hat Customer Portal . |
|
[
Permlink
| « Hide
]
Joe Luo added a comment - 28/Jul/09 11:13 AM
Here is complete log file from the instance "foo".
This log file is ok. These warnings can be safely ignored.
It would be interesting to have the log at DEBUG level maybe. I think the problem here is that the instance is always in a Starting state and can never be connected to:
smx@root:admin> connect foo Connecting to: localhost:8103 ERROR CommandLineExecutionFailed: org.apache.geronimo.gshell.command.CommandException: org.apache.ge ronimo.gshell.commandline.CommandLineExecutionFailed: org.apache.geronimo.gshell.command.CommandExce ption: org.apache.sshd.common.RuntimeSshException: Failed to get the session. smx@root:admin> I turned on the debug logs and will attach them here now. It looks like the start works:
It seems the mina socket gets a connection refused when trying to connect to the instance then:
I'll attach the full log here for reference, you can ignore the AMQ network connector exceptions - this is picking up another broker because I left the default multicast config turned on. I notice there are 40 bundles in the cache for the foo instance, whereas there are 115 bundles in the parent instance. I wonder if somehow the remote console has not been started in the foo instance, so it cannot be connected to?
Interestingly, if I try and start the foo instance from the command line I can see that it appears to be waiting for a lock: C:\opensource\built\fuse\esb\4.1.0.2>cd instances\foo C:\opensource\built\fuse\esb\4.1.0.2\instances\foo>bin\servicemix.bat servicemix.bat: Ignoring predefined value for SERVICEMIX_HOME Bundle listed in startup.properties configuration not found: com/google/code/sshd/sshd/0.1.0/sshd-0.1.0.jar Bundle listed in startup.properties configuration not found: org/apache/servicemix/bundles/org.apache.servicemix.bundles.mina/2.0.0-M6/org.apache.servicemix.bundles.mina-2.0.0-M6.jar Waiting for the lock ... The following statement explains why the main console can not connect to the instance:
Bundle listed in startup.properties configuration not found: com/google/code/sshd/sshd/0.1.0/sshd-0.1.0.jar This means that the SSHD bundle is misconfigured in the etc/startup.properties file of the sub-instance. If SSHD can not be loaded, it explains why the connection fails and also why the instance is always displayed as starting instead of started, as the check consist in verifying that the socket has been opened. Looks like the problem is the foo instance has misconfigured the mina and sshd bundles alright:
org/apache/servicemix/bundles/org.apache.servicemix.bundles.mina/2.0.0-M6/org.apache.servicemix.bundles.mina-2.0.0-M6.jar=30 ... com/google/code/sshd/sshd/0.1.0/sshd-0.1.0.jar=30 The root instance has a different bundle setup for this: org/apache/mina/mina-core/2.0.0-M6/mina-core-2.0.0-M6.jar=30 org/apache/sshd/sshd-core/0.1.0/sshd-core-0.1.0.jar=30 I commented out the mina and sshd bundles from the foo instance and replaced them with the bundles from the root instance in the etc/startup.properties. To try and dig a bit deeper I tried to start the foo instance from the command line:
I was then able to connect using admin/connect foo from the root instance. However, I noted the foo instance process was spinning using 100% CPU. When I checked the logs I could see it was constantly throwing an exception from JLineConsole.readLine(). Note that above I do have servicemix.startLocalConsole=false. Here is the stack: 12:48:01,161 | DEBUG | Thread-18 | ExpressionFactory | e.commons.jexl.ExpressionFactory 121 | Parsing expression: gshell.username; 12:48:01,161 | DEBUG | Thread-18 | ExpressionFactory | e.commons.jexl.ExpressionFactory 121 | Parsing expression: gshell.group; 12:48:01,161 | DEBUG | Thread-18 | JLineConsole | .geronimo.gshell.console.Console 132 | Work failed: java.io.IOException: Pipe closed java.io.IOException: Pipe closed at org.apache.sshd.common.channel.ChannelPipedInputStream.read(ChannelPipedInputStream.java:59) at org.apache.sshd.common.channel.ChannelPipedInputStream.read(ChannelPipedInputStream.java:45) at jline.Terminal.readCharacter(Terminal.java:99) at jline.WindowsTerminal.readCharacter(WindowsTerminal.java:235) at jline.WindowsTerminal.readVirtualKey(WindowsTerminal.java:319) at jline.ConsoleReader.readVirtualKey(ConsoleReader.java:1453) at jline.ConsoleReader.readBinding(ConsoleReader.java:654) at jline.ConsoleReader.readLine(ConsoleReader.java:494) at jline.ConsoleReader.readLine(ConsoleReader.java:448) at org.apache.geronimo.gshell.console.JLineConsole.readLine(JLineConsole.java:95) at org.apache.geronimo.gshell.console.Console.work(Console.java:150) at org.apache.geronimo.gshell.console.Console.run(Console.java:128) at org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl$ShellImpl.run(ShellFactoryImpl.java:238) at org.apache.geronimo.gshell.commands.ssh.ShellFactoryImpl$ShellImpl.run(ShellFactoryImpl.java:258) at java.lang.Thread.run(Thread.java:595) If I set startLocalConsole to true, the console will load up and everything works fine, but I still see the CPU spinning. From the logs I can see it's the same exception being thrown in this instance as well. I notice that it is only when I connect to the instance from the root instance that it starts to spin, it appears to be related to constantly looking for commands from the connection. I just tested this on the M1 release and it works fine now
karaf@root> admin:create foo Creating new instance on port 8102 at: C:\opensource\built\fuse\esb\apache-servi cemix-4.2.0.0M1-fuse\instances\foo Creating dir: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\bin Creating dir: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc Creating dir: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\system Creating dir: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\deploy Creating dir: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\data Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\config.properties Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\java.util.logging.properties Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\org.apache.felix.karaf.log.cfg Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\org.apache.felix.karaf.features.cfg Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\org.apache.felix.karaf.management.cfg Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\org.ops4j.pax.logging.cfg Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\org.ops4j.pax.url.mvn.cfg Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\startup.properties Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\users.properties Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\system.properties Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\etc\org.apache.felix.karaf.shell.cfg Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\bin\start.bat Creating file: C:\opensource\built\fuse\esb\apache-servicemix-4.2.0.0M1-fuse\ins tances\foo\bin\stop.bat karaf@root> admin:start foo karaf@root> admin:connect foo Connecting to host localhost on port 8102 Connected __ __ ____ / //_/____ __________ _/ __/ / ,< / __ `/ ___/ __ `/ /_ / /| |/ /_/ / / / /_/ / __/ /_/ |_|\__,_/_/ \__,_/_/ Apache Felix Karaf (1.0.0.0M1-fuse) Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Karaf. karaf@foo> info Karaf Karaf home C:\opensource\built\fuse\esb\apache-servicemix-4.2 .0.0M1-fuse Karaf base C:\opensource\built\fuse\esb\apache-servicemix-4.2 .0.0M1-fuse\instances\foo JVM Java Virtual Machine Java HotSpot(TM) Server VM version 11.3-b02 Vendor Sun Microsystems Inc. Uptime 7.921 seconds Total compile time 1.512 seconds Threads Live threads 25 Daemon threads 14 Peak 25 Total started 30 Memory Current heap size 8,152 kbytes Maximum heap size 504,896 kbytes Committed heap size 36,416 kbytes Pending objects 0 Garbage collector Name = 'PS Scavenge', Collections = 6, Time = 0.02 5 seconds Garbage collector Name = 'PS MarkSweep', Collections = 2, Time = 0.0 91 seconds Classes Current classes loaded 2,971 Total classes loaded 2,971 Total classes unloaded 0 Operating system Name Windows XP version 5.1 Architecture x86 Processors 2 karaf@foo> |
||||||||||||||||||||||||||||||||||||||||||||