Hi All,
I am trying to write a netconf subsystem for my testing purpose
using apache mina sshd server latest version.
The client is able to communicate with the server and everything is working
fine, until the connection is closed (either by client or due to some
signal). After that client tries to re-establish the connection to the
server, but it keeps failing with java.lang.IllegalStateException:
Unsupported command: 50. Please can someone help to overcome this situation.
My netconf subsystem implements the following interfaces public class
Jnetconf implements Command, SessionAware,ChannelDataReceiver,
ChannelSessionAware
Jul 28, 2014 12:52:11 PM jsim.subsystem.netconf.Jnetconf close
INFO: CLOSED...
Jul 28, 2014 12:52:11 PM org.apache.sshd.server.session.ServerSession <init>
Jul 28, 2014 12:56:59 PM org.apache.sshd.server.session.ServerSession <init>
INFO: Server session created from /10.204.244.158:46475
Jul 28, 2014 12:56:59 PM org.apache.sshd.common.session.AbstractSession
negotiate
INFO: Kex: server->client blowfish-cbc hmac-md5-96 none
Jul 28, 2014 12:56:59 PM org.apache.sshd.common.session.AbstractSession
negotiate
INFO: Kex: client->server blowfish-cbc hmac-md5-96 none
Jul 28, 2014 12:56:59 PM jsim.JpasswordAuthenticator authenticate
INFO: User: root
Jul 28, 2014 12:56:59 PM jsim.JpasswordAuthenticator authenticate
INFO: Password: netscreen
Jul 28, 2014 12:56:59 PM jsim.JpasswordAuthenticator authenticate
INFO: Server Session:
Jul 28, 2014 12:56:59 PM jsim.JpasswordAuthenticator authenticate
INFO: client: SSH-2.0-http://www.sshtools.com J2SSH [CLIENT]
Jul 28, 2014 12:56:59 PM
org.apache.sshd.server.session.ServerUserAuthService process
INFO: Session root@/10.204.244.158:46475 authenticated
Jul 28, 2014 12:56:59 PM org.apache.sshd.common.session.AbstractSession
exceptionCaught
WARNING: Exception caught
java.lang.IllegalStateException: Unsupported command: 50
at
org.apache.sshd.common.session.AbstractConnectionService.process(AbstractConnectionService.java:169)
at
org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:399)
at
org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:295)
at
org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:720)
at
org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:277)
at
org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)
at
org.apache.sshd.common.io.nio2.Nio2Session$1.completed(Nio2Session.java:188)
at
org.apache.sshd.common.io.nio2.Nio2Session$1.completed(Nio2Session.java:174)
at sun.nio.ch.Invoker.invokeUnchecked(Unknown Source)
at sun.nio.ch.Invoker$2.run(Unknown Source)
at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Thanks & Regards,
Sendilraj P