Hello,
I am attempting to download a file (any size, small or large) with an SFTP
server by MessageWay.com and cannot get a clean shutdown after transfer. I
have tried several versions of libssh2 including libssh2-1.2.5-20100318.
The same transfer works using OpenSSH/sftp, but never with curl/libssh2.
Unfortunately, I do not have access to the MessageWay SFTP server (version
etc.) as it is hosted by a third party.
The file is transferred completely, the file size on the client matches the
file size on the server, but the process hangs for several minutes and then
I receive an error from close. I know this isn't a curl list but the curl
output happens to be:
libssh2_sftp_close: Resource temporarily unavailable (this is output from
perror after the call to libssh2_sftp_close())
curl: (56) Failure when receiving data from the peer
Here is the debug information from SSH2:
trace output here...I see the complete file transfer
PROCESS HANGS FOR SEVERAL SECONDS
== Info: SSH DISCONNECT starts now
== Info: SFTP 0x9714090 state change from SSH_STOP to SSH_SFTP_SHUTDOWN
== Info: Failed to close libssh2 file during shutdown: -30
== Info: SFTP 0x9714090 state change from SSH_SFTP_SHUTDOWN to
SSH_SESSION_DISCONNECT
== Info: SFTP 0x9714090 state change from SSH_SESSION_DISCONNECT to
SSH_SESSION_FREE
== Info: SFTP 0x9714090 state change from SSH_SESSION_FREE to SSH_STOP
== Info: SSH DISCONNECT is done
== Info: Closing connection #0
== Info: Failure when receiving data from the peer
Any thoughts on how I can correct or avoid this, via setsockopt or configure
options? Why would OpenSSH/sftp succeed but libssh2 fail during the
close? Any help is appreciated!
Thanks,
Matt
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-03-20