I have recently had also some problems with Net::SFTP.

Cannot help with this hang, but just in case remember that OpenSSH installs t=
he command-line client sftp(1). With that client you can check whether the h=
ang can be reproduced. If it does maybe the problem is not in the client sid=
e. Otherwise, it gives an alternative if shelling out is an option.

Enviat des del meu iPad

El 6 Jun 2012, a les 05:54, Tim Uckun <timuckun / gmail.com> va escriure:
> I have some code which attempts to download some data from an sftp
> server and it hangs. Once it hangs it seems to lock up the entire
> process so the timeout is not working either.  The code hangs at the
> session.download! method (debug output below)
>=20
> The same code works for other servers and even other directories on
> the same server so this is very baffling to me.
>=20
> I am using ruby 1.9.3 but I have also tried it with ruby 1.8.7. The
> Timeout::timeout wrapper doesn't do anything since the blocking is
> apparently locking up the entire process.
>=20
>=20
>=20
> debug output
>=20
> sending open packet (2)
> queueing packet nr 13 type 94 len 92
> sent 116 bytes
> read 68 bytes
> received packet nr 15 type 94 len 44
> channel_data: 0 17b
> received sftp packet 102 len 13
> sending read packet (3)
> queueing packet nr 14 type 94 len 44
> sent 68 bytes
> read 1358 bytes
> read 742 bytes
> received packet nr 16 type 94 len 2076
> channel_data: 0 2048b
> received sftp packet 103 len 2044
> sending read packet (4)
> queueing packet nr 15 type 94 len 44
> sent 68 bytes
> read 52 bytes
> received packet nr 17 type 94 len 28
> channel_data: 0 2b
> read 84 bytes
> received packet nr 18 type 94 len 60
> channel_data: 0 32b
> sending close packet (5)
> queueing packet nr 16 type 94 len 44
> sent 68 bytes
> read 68 bytes
> received packet nr 19 type 94 len 44
> channel_data: 0 28b
>=20