Hi Prakash,
implementing the a JSch logger gives you more information on the start up
(connect and key exchange) of a connection.
To cope with your timeout-problem, try setting the session's timeout before
connecting using "session.setTimeout(int timeoutInMilliseconds)".
And upgrading to a more recent version of JSch might be a good idea. :)
Greetings
Volker
Von: Prakash Babu [mailto:jprakashbab...@gmail.com]
Gesendet: Montag, 10. Februar 2014 07:24
An: jsch-users@lists.sourceforge.net
Betreff: [JSch-users] jsch session connect waits indefinitely
Hi,
I am using JSCH 0.1.44 and trying to execute a remote command on a Solaris Host
and the
session.connect() waits indefinitely.
JSch jsch = new JSch();
Session session = jsch.getSession(m_user, m_host, m_port);
session.connect(60000)
Jstack thread dump shows the following stack trace
java.lang.Thread.State: RUNNABLE
at java.util.WeakHashMap.get(WeakHashMap.java:355)
at javax.crypto.SunJCE_b.a(DashoA13*..)
at javax.crypto.SunJCE_h.a(DashoA13*..)
at javax.crypto.Cipher.c(DashoA13*..)
at javax.crypto.Cipher.b(DashoA13*..)
at javax.crypto.Cipher.a(DashoA13*..)
- locked <0x0000000788198fd8> (a java.lang.Object)
at javax.crypto.Cipher.init(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at com.jcraft.jsch.jce.ARCFOUR.init(ARCFOUR.java:54)
at com.jcraft.jsch.Session.checkCipher(Session.java:1947)
at com.jcraft.jsch.Session.checkCiphers(Session.java:1924)
at com.jcraft.jsch.Session.send_kexinit(Session.java:562)
at com.jcraft.jsch.Session.connect(Session.java:278)
What could be the possible causes for this connect issue.
Any debug statements I can add to triage this issue ?
thanks,
Prakash
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users