I have a Java class that uses Jsch for SFTP file transfer. There are two
methods - one is downloading a file and another is uploading a file.
Each method separately open the session, get channel, do the "get" or
"put" and then close channel and session (by calling its "disconnect"
method, respectively).

 

My main program calls these two methods. If main grogram calls one of
two methods, it works fine. However, if main program calls both methods
in a row (remember each method open / close session and channel
independently), the second call always hangs at Channel.connect.
(Session open is fine in second call). Does it mean the first
"disconnect" does not clean up everything (seems some thread is still
alive?)?. After I kill the program and rerun it, first call still works
and second hangs there.

 

More interesting / complicated things are this happens to one particular
SFTP site. The program works very well if it accesses SFTP sites (on
Linux / Unix) inside of the company. The site that has problem is
external site and it is on Windows. I don't know these make any
different (seems it does).

 

I am exhausted on this. Please if anyone can help me on this, give me a
hint, suggestion or pointer, it will be appreciated very much.

 

Many thanks!

 

Gary



This electronic message transmission contains information from the Company that 
may be proprietary, confidential and/or privileged. 
The information is intended only for the use of the individual(s) or entity 
named above.  If you are not the intended recipient, be 
aware that any disclosure, copying or distribution or use of the contents of 
this information is prohibited.  If you have received 
this electronic transmission in error, please notify the sender immediately by 
replying to the address listed in the "From:" field. 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to