Ask Your Question
1

Karaf client failes to connect to a server under linux

asked 2014-12-09 05:56:56 -0700

miclando gravatar image

updated 2014-12-09 22:35:44 -0700

I am trying to access an OpenDaylight server running on Linux in a background process. I'm using ODL 0.2.1 (Helium SR1).

From what I understand, if you are trying to connect from the same machine all you need to do is run ./client to establish a connection to the Karaf shell.

However, I'm seeing this:

[root@d20-srv-81-32 bin]# ./client
Logging in as karaf
258 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
[root@d20-srv-81-32 bin]#

Connecting via SSH works:

ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 karaf@localhost

Has any one else encountered this issue?

more info ./client -v result

[root@d20-srv-81-32 bin]# ./client -v
23 [main] INFO org.apache.sshd.common.util.SecurityUtils - BouncyCastle not registered, using the default JCE provider
207 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Session created...
Logging in as karaf
215 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Server version string: SSH-2.0-SSHD-CORE-0.12.0
216 [pool-2-thread-1] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_KEXINIT
227 [pool-2-thread-1] INFO org.apache.sshd.client.kex.DHG1 - Send SSH_MSG_KEXDH_INIT
234 [pool-2-thread-2] INFO org.apache.sshd.client.kex.DHG1 - Received SSH_MSG_KEXDH_REPLY
241 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key:
241 [pool-2-thread-2] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_NEWKEYS
245 [pool-2-thread-2] INFO org.apache.sshd.client.session.ClientSessionImpl - Send SSH_MSG_SERVICE_REQUEST for ssh-userauth
248 [main] INFO org.apache.sshd.client.auth.UserAuthAgent - Send SSH_MSG_USERAUTH_REQUEST for publickey
256 [pool-2-thread-5] INFO org.apache.sshd.client.auth.UserAuthAgent - Received SSH_MSG_USERAUTH_SUCCESS
306 [main] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_OPEN on channel 101
307 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send agent forwarding request
308 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_REQUEST pty-req
308 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_REQUEST env
309 [pool-2-thread-2] INFO org.apache.sshd.client.channel.ChannelShell - Send SSH_MSG_CHANNEL_REQUEST shell

[root@d20-srv-81-32 bin]#

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-12-09 08:07:44 -0700

updated 2014-12-09 08:09:00 -0700

I was seeing this behavior, but after nuking my unarchived 0.2.1 and starting fresh it went away. :|

Note that the key error displayed doesn't imply that you didn't connect. The issue is that it's not dropping you into an interactive session, as expected.

[~]$ rm -rf distribution-karaf-0.2.1-Helium-SR1
[~]$ tar xf distribution-karaf-0.2.1-Helium-SR1.tar.gz
[~]$ cd distribution-karaf-0.2.1-Helium-SR1/bin
[~/distribution-karaf-0.2.1-Helium-SR1/bin]$ ./start
# This will likely work on your system. Shows that you are actually connecting to shell.
[~/distribution-karaf-0.2.1-Helium-SR1/bin]$ ./client log:get
client: JAVA_HOME not set; results may vary
Logging in as karaf
267 [pool-2-thread-3] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key: 
Logger | Level
--------------
ROOT   | INFO
# This is the part that's not working on your system
[~/distribution-karaf-0.2.1-Helium-SR1/bin]$ ./client
client: JAVA_HOME not set; results may vary
Logging in as karaf
246 [pool-2-thread-2] WARN org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier - Server at /0.0.0.0:8101 presented unverified key: 

    ________                       ________                .__  .__       .__     __       
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_     
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\    
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   Y  \  |      
    \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__|      
            \/|__|        \/     \/        \/     \/\/            /_____/      \/          


Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.

opendaylight-user@root>

I also tested the latest Lithium snapshot. It worked as expected.

edit flag offensive delete publish link more

Comments

thanks for the reply. i tried ./client log:get and it does work. so i am left with the same problem i am unable to get an interactive session. do you have any suggestions? ps i updated the question with the results of ./client -v

miclando ( 2014-12-09 22:32:29 -0700 )edit

Have you tried starting with a fresh un-archive of 0.2.1? What Java version are you using? OS?

dfarrell07 ( 2014-12-10 06:35:36 -0700 )edit

@dfarrell07 that is all most what i did.

miclando ( 2014-12-10 23:13:20 -0700 )edit
0

answered 2014-12-10 23:13:29 -0700

miclando gravatar image

in the end the issue was caused because i used the zip release of opendaylight helium.

on the opendaylight download page there are two versions. one compressed as a zip and the other as tar.gz. from what i found there are system differences between them, the zip is for windows and the tar for Linux.

when i deployed the tar version on Linux the issue did not reproduce.

edit flag offensive delete publish link more

Comments

There shouldn't be a difference between the two versions, one isn't for one OS and one for another. They are just different archive tech.

dfarrell07 ( 2014-12-11 07:33:25 -0700 )edit

actually permissions could caused this...

Tony Tkacik ( 2015-01-12 02:47:41 -0700 )edit
Login/Signup to Answer

Stats

Asked: 2014-12-09 05:56:56 -0700

Seen: 3,127 times

Last updated: Dec 10 '14