Re: [JSch-users] Long running command hangs
Status: Alpha
Brought to you by:
ymnk
From: <ym...@jc...> - 2007-01-26 01:52:51
|
Hi, +-From: Norbert Podhorszki <pno...@cs...> -- |_Date: Thu, 25 Jan 2007 17:24:46 -0800 (PST) _________ | |If I execute a long lasting command on a ChannelExec, long means > 5 |minutes, e.g. sleep 600, on MOST machines, it never returns from the |reading cycle (i.e. neither isClosed() nor isEOF() becomes true for |the channel nor, in the jsch Exec example, the in.available/in.read pair |breaks the cycle). Is there possibility that remote sshd or NAT have dropped the socket? How about following? // send alive messages every 10 seconds. session.setServerAliveInterval(10000); | ChannelExec channel = null; | synchronized (session) { ... Sincerely, -- Atsuhiko Yamanaka JCraft,Inc. 1-14-20 HONCHO AOBA-KU, SENDAI, MIYAGI 980-0014 Japan. Tel +81-22-723-2150 +1-415-578-3454 Fax +81-22-224-8773 Skype callto://jcraft/ |