You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Chandan <ch...@in.bosch.com> on 2016/08/05 04:57:25 UTC

Unable to connect to a child instance with instance:connect

Steps to reproduce:
1/ install a fresh karaf distribution
2/ launch karaf.bat
3/ root()> instance:create test
4/ root()> instance:start test
5/ root()> instance:connect test
Connecting to host localhost on port 8103
Connecting to unknown server. Automatically adding to known hosts.
Storing the server key in known_hosts.
Password: *****
Connected
Error executing command: Channel opening failed

Log :

org.apache.sshd.common.SshException: Channel opening failed

Environment :

Windows 7, JDK - 1.8.0.71

Regards,
Chandan



--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-connect-to-a-child-instance-with-instance-connect-tp4047428.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Unable to connect to a child instance with instance:connect

Posted by CodeCola <pr...@rogers.com>.
I too have the same error:

karaf@root()> instance:create SecondInstance
karaf@root()> instance:start SecondInstance
karaf@root()> instance:connect SecondInstance
Connecting to host localhost on port 8106
Connecting to unknown server. Automatically adding to known hosts.
Storing the server key in known_hosts.
Password:  *****
Connected
*Error executing command: Channel opening failed*


Windows 10 



--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-connect-to-a-child-instance-with-instance-connect-tp4047428p4048989.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Unable to connect to a child instance with instance:connect

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK thanks.

Let me try to reproduce on a VM.

Regards
JB



On Aug 6, 2016, 07:01, at 07:01, Chandan <ch...@in.bosch.com> wrote:
>Hello,
>
>Yes i tested in windows
>Log :
>
>org.apache.sshd.common.SshException: Channel opening failed
>	at
>org.apache.sshd.client.future.DefaultOpenFuture.verify(DefaultOpenFuture.java:43)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.karaf.shell.ssh.SshAction.execute(SshAction.java:241)[45:org.apache.karaf.shell.ssh:4.0.5]
>	at
>org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.karaf.shell.impl.console.ConsoleSessionImpl.execute(ConsoleSessionImpl.java:296)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.karaf.instance.command.ConnectCommand.doExecute(ConnectCommand.java:77)[32:org.apache.karaf.instance.core:4.0.5]
>	at
>org.apache.karaf.instance.command.InstanceCommandSupport.execute(InstanceCommandSupport.java:90)[32:org.apache.karaf.instance.core:4.0.5]
>	at
>org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.5]
>	at
>org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.5]
>	at java.lang.Thread.run(Thread.java:745)[:1.8.0_73]
>Caused by: java.lang.NullPointerException
>	at org.apache.sshd.common.util.Buffer.putString(Buffer.java:435)
>	at
>org.apache.sshd.client.channel.PtyCapableChannelSession.doOpenPty(PtyCapableChannelSession.java:192)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.client.channel.ChannelShell.doOpen(ChannelShell.java:38)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.client.channel.AbstractClientChannel.handleOpenSuccess(AbstractClientChannel.java:232)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.session.AbstractConnectionService.channelOpenConfirmation(AbstractConnectionService.java:197)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.session.AbstractConnectionService.process(AbstractConnectionService.java:147)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:431)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:326)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:306)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:780)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:308)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:184)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)[1:org.apache.sshd.core:0.14.0]
>	at
>org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
>	at java.security.AccessController.doPrivileged(Native
>Method)[:1.8.0_73]
>	at
>org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[1:org.apache.sshd.core:0.14.0]
>	at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.8.0_73]
>	at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.8.0_73]
>	at
>sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.8.0_73]
>	at
>java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_73]
>	at
>java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_73]
>	... 1 more
>
>
>
>
>--
>View this message in context:
>http://karaf.922171.n3.nabble.com/Unable-to-connect-to-a-child-instance-with-instance-connect-tp4047428p4047445.html
>Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Unable to connect to a child instance with instance:connect

Posted by Chandan <ch...@in.bosch.com>.
Hello,

Yes i tested in windows
Log :

org.apache.sshd.common.SshException: Channel opening failed
	at
org.apache.sshd.client.future.DefaultOpenFuture.verify(DefaultOpenFuture.java:43)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.karaf.shell.ssh.SshAction.execute(SshAction.java:241)[45:org.apache.karaf.shell.ssh:4.0.5]
	at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.execute(ConsoleSessionImpl.java:296)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.karaf.instance.command.ConnectCommand.doExecute(ConnectCommand.java:77)[32:org.apache.karaf.instance.core:4.0.5]
	at
org.apache.karaf.instance.command.InstanceCommandSupport.execute(InstanceCommandSupport.java:90)[32:org.apache.karaf.instance.core:4.0.5]
	at
org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.5]
	at
org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.5]
	at java.lang.Thread.run(Thread.java:745)[:1.8.0_73]
Caused by: java.lang.NullPointerException
	at org.apache.sshd.common.util.Buffer.putString(Buffer.java:435)
	at
org.apache.sshd.client.channel.PtyCapableChannelSession.doOpenPty(PtyCapableChannelSession.java:192)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.client.channel.ChannelShell.doOpen(ChannelShell.java:38)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.client.channel.AbstractClientChannel.handleOpenSuccess(AbstractClientChannel.java:232)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.session.AbstractConnectionService.channelOpenConfirmation(AbstractConnectionService.java:197)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.session.AbstractConnectionService.process(AbstractConnectionService.java:147)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:431)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:326)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.client.session.ClientSessionImpl.handleMessage(ClientSessionImpl.java:306)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:780)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:308)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:184)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.io.nio2.Nio2Session$1.onCompleted(Nio2Session.java:170)[1:org.apache.sshd.core:0.14.0]
	at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:32)
	at java.security.AccessController.doPrivileged(Native Method)[:1.8.0_73]
	at
org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:30)[1:org.apache.sshd.core:0.14.0]
	at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)[:1.8.0_73]
	at sun.nio.ch.Invoker$2.run(Invoker.java:218)[:1.8.0_73]
	at
sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)[:1.8.0_73]
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_73]
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_73]
	... 1 more




--
View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-connect-to-a-child-instance-with-instance-connect-tp4047428p4047445.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Unable to connect to a child instance with instance:connect

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Chargan,

Can you paste the log of the child instance ?

I'm suspecting a Windows issue as I just tried and it works fine on Linux.

Regards
JB

On 08/05/2016 06:57 AM, Chandan wrote:
> Steps to reproduce:
> 1/ install a fresh karaf distribution
> 2/ launch karaf.bat
> 3/ root()> instance:create test
> 4/ root()> instance:start test
> 5/ root()> instance:connect test
> Connecting to host localhost on port 8103
> Connecting to unknown server. Automatically adding to known hosts.
> Storing the server key in known_hosts.
> Password: *****
> Connected
> Error executing command: Channel opening failed
>
> Log :
>
> org.apache.sshd.common.SshException: Channel opening failed
>
> Environment :
>
> Windows 7, JDK - 1.8.0.71
>
> Regards,
> Chandan
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Unable-to-connect-to-a-child-instance-with-instance-connect-tp4047428.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofr
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com