Hi Users,
I am currently trying to automate the initial installation for
ServiceMix. i.e. once I start servicemix, the initial commands like needs
to be automated into a script. When I login to the Linux Server terminal and
issue a command , it prompts for password and I have to enter . To automate
this, I tried ant and Java Client (for both use Jsch 0.1.48). When I issue
commands using this, these are the logs
19:22:57,961 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Session created...
19:22:57,979 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Client version string: SSH-2.0-JSCH-0.1.48
19:22:58,201 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_KEXINIT
19:22:58,202 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received SSH_MSG_KEXINIT
19:22:58,221 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_KEXDH_INIT
19:22:58,221 | INFO | NioProcessor-2 | DHG1 |
16 - sshd-core - 0.5.0 | Received SSH_MSG_KEXDH_INIT
19:22:58,236 | DEBUG | NioProcessor-2 | DHG1 |
16 - sshd-core - 0.5.0 | K_S: 00 <Some hex codes><Some hex codes><Some hex
codes><Some hex codes><Some hex codes>
19:22:58,236 | INFO | NioProcessor-2 | DHG1 |
16 - sshd-core - 0.5.0 | Send SSH_MSG_KEXDH_REPLY
19:22:58,236 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Send SSH_MSG_NEWKEYS
19:22:58,262 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_NEWKEYS
19:22:58,262 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received SSH_MSG_NEWKEYS
19:22:58,267 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_SERVICE_REQUEST
19:22:58,267 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received SSH_MSG_SERVICE_REQUEST 'ssh-userauth'
19:22:58,267 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Accepting user authentication request
19:22:58,268 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Authorized authentication methods: password
19:22:58,269 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_USERAUTH_REQUEST
19:22:58,269 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received SSH_MSG_USERAUTH_REQUEST
19:22:58,269 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Authenticating user 'smx' with method 'none'
19:22:58,269 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Unsupported authentication method 'none'
19:22:58,271 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_USERAUTH_REQUEST
19:22:58,271 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received SSH_MSG_USERAUTH_REQUEST
19:22:58,271 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Authenticating user 'smx' with method 'password'
19:22:58,273 | DEBUG | NioProcessor-2 | ServiceRecipe |
10 - org.apache.aries.blueprint - 0.3.1 | Retrieving service for bundle
org.apache.karaf.jaas.config [30] and service registration
org.apache.felix.framework.ServiceRegistrationImpl@175b132
19:22:58,273 | DEBUG | NioProcessor-2 | ServiceRecipe |
10 - org.apache.aries.blueprint - 0.3.1 | Method entry: getService, args
org.apache.karaf.jaas.config.impl.Config@10a9da7
19:22:58,284 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Authentication succeeded
19:23:08,316 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_CHANNEL_OPEN
19:23:08,316 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received SSH_MSG_CHANNEL_OPEN session
19:23:08,327 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Received packet SSH_MSG_CHANNEL_REQUEST
19:23:08,327 | INFO | NioProcessor-2 | ChannelSession |
16 - sshd-core - 0.5.0 | Received SSH_MSG_CHANNEL_REQUEST on channel 0
19:23:08,327 | INFO | NioProcessor-2 | ChannelSession |
16 - sshd-core - 0.5.0 | Received channel request: exec
19:23:08,327 | INFO | NioProcessor-2 | ChannelSession |
16 - sshd-core - 0.5.0 | Executing command: bundles:stop 144
19:23:08,331 | INFO | NioProcessor-2 | ChannelSession |
16 - sshd-core - 0.5.0 | Send SSH_MSG_CHANNEL_EOF on channel 0
19:23:08,331 | INFO | NioProcessor-2 | ChannelSession |
16 - sshd-core - 0.5.0 | Send SSH_MSG_CHANNEL_REQUEST exit-status on channel
0
19:23:08,331 | INFO | NioProcessor-2 | ChannelSession |
16 - sshd-core - 0.5.0 | Send SSH_MSG_CHANNEL_CLOSE on channel 0
19:23:08,332 | WARN | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Exception caught
java.io.IOException: Unable to start shell
at
org.apache.karaf.shell.ssh.ShellCommandFactory$ShellCommand.start(ShellCommandFactory.java:103)[28:org.apache.karaf.shell.ssh:2.2.4]
at
org.apache.sshd.server.channel.ChannelSession.handleExec(ChannelSession.java:398)[16:sshd-core:0.5.0]
at
org.apache.sshd.server.channel.ChannelSession.handleRequest(ChannelSession.java:232)[16:sshd-core:0.5.0]
at
org.apache.sshd.server.channel.ChannelSession.handleRequest(ChannelSession.java:194)[16:sshd-core:0.5.0]
at
org.apache.sshd.common.session.AbstractSession.channelRequest(AbstractSession.java:999)[16:sshd-core:0.5.0]
at
org.apache.sshd.server.session.ServerSession.handleMessage(ServerSession.java:210)[16:sshd-core:0.5.0]
at
org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:522)[16:sshd-core:0.5.0]
at
org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:225)[16:sshd-core:0.5.0]
at
org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:58)[16:sshd-core:0.5.0]
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:716)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:796)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:692)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:645)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:634)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:66)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1078)[33:org.apache.mina.core:2.0.1]
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)[33:org.apache.mina.core:2.0.1]
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_25]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_25]
at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]
Caused by: org.apache.felix.gogo.runtime.CommandNotFoundException: Command
not found: services:list
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:471)
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at
org.apache.karaf.shell.ssh.ShellCommandFactory$ShellCommand$1.run(ShellCommandFactory.java:92)
at java.security.AccessController.doPrivileged(Native Method)[:1.6.0_25]
at javax.security.auth.Subject.doAs(Subject.java:396)[:1.6.0_25]
at
org.apache.karaf.shell.ssh.ShellCommandFactory$ShellCommand.start(ShellCommandFactory.java:90)[28:org.apache.karaf.shell.ssh:2.2.4]
... 24 more
19:23:08,337 | INFO | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Closing session
19:23:08,337 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Closing channel 0
19:23:08,337 | INFO | NioProcessor-2 | ChannelSession |
16 - sshd-core - 0.5.0 | Closing channel 0 immediately
19:23:08,338 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | Closing IoSession
19:23:08,339 | DEBUG | NioProcessor-2 | ServerSession |
16 - sshd-core - 0.5.0 | IoSession closed
The Ant task I am using is,
<sshexec host="localhost" username="smx" command="services:list"
port="8101" password="smx" trust="yes" failonerror="yes"/>
But If I issue some unknown command through the console that came up on
servicemix startup,
<sshexec host="localhost" username="smx"
command="services:list" port="8101"
password="smx" trust="yes" output="oaeop.txt"
outputproperty="serviceList"
org.apache.felix.gogo.runtime.CommandNotFoundException: Command not found:
somecommand
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:471)[25:org.apache.karaf.shell.console:2.2.4]
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[25:org.apache.karaf.shell.console:2.2.4]
at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[25:org.apache.karaf.shell.console:2.2.4]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[25:org.apache.karaf.shell.console:2.2.4]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[25:org.apache.karaf.shell.console:2.2.4]
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[25:org.apache.karaf.shell.console:2.2.4]
at
org.apache.karaf.shell.console.jline.Console.run(Console.java:218)[25:org.apache.karaf.shell.console:2.2.4]
at java.lang.Thread.run(Thread.java:619)[:1.6.0_14]
In <b>org.apache.karaf.shell.cfg*
I have the following configurations
*sshPort=8101
sshHost=0.0.0.0*
The stack is although similar, but I dont understand what might cause the
problem.
*SET UP DETAILS: *
*Version * ServiceMix 4.4.2
*sshPort * 8101(default port)
*jsch version* jsch-0.1.48
--
View this message in context:
http://servicemix.396122.n5.nabble.com/ServiceMix-commands-executed-using-sshPort-using-Jsch-or-Ant-of-ServiceMix-throws-CommandNotFound-tp5714595.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.