curl-library
Re: curl sftp shutdown error with MessageWay server
Date: Fri, 26 Mar 2010 06:03:24 -0400
As suggested in the libssh2 group, I ran libssh2's sftp.c example. The
libssh2 example works consistently with the MessageWay server, I can
download any file without issue. Curl and libcurl, however,
consistently hang after receiving the data and immediately before the
message "SSH DISCONNECT starts now".
*= Info: SFTP 0x83c20e0 state change from SSH_SFTP_QUOTE_INIT to
SSH_SFTP_TRANS_INIT
== Info: SFTP 0x83c20e0 state change from SSH_SFTP_TRANS_INIT to
SSH_SFTP_DOWNLOAD_INIT
== Info: SFTP 0x83c20e0 state change from SSH_SFTP_DOWNLOAD_INIT to
SSH_SFTP_DOWNLOAD_STAT
== Info: SFTP 0x83c20e0 state change from SSH_SFTP_DOWNLOAD_STAT to SSH_STOP
== Info: DO phase is complete
<= Recv data, 62 bytes (0x3e)
.... data dump here ...
.... Process hangs here, after displaying data received and before
displaying the following:
== Info: SSH DISCONNECT starts now
== Info: SFTP 0x83c20e0 state change from SSH_STOP to SSH_SFTP_SHUTDOWN
== Info: Failed to close libssh2 file during shutdown: -30
== Info: SFTP 0x83c20e0 state change from SSH_SFTP_SHUTDOWN to
SSH_SESSION_DISCONNECT
== Info: SFTP 0x83c20e0 state change from SSH_SESSION_DISCONNECT to
SSH_SESSION_FREE
== Info: SFTP 0x83c20e0 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*
*
*
It appears there several differences between the sftp.c example and
libcurl, such as blocking vs non-blocking. I tried enabling blocking in
libcurl but the behavior was the same. I also tried enabling SO_LINGER
with 0 timeout, to no effect. Please let me know if there is anything
else I can try...this seems to be an issue in libcurl with MessageWay.
Thanks
Matt
Daniel Stenberg wrote:
> On Sun, 21 Mar 2010, Matt Wixson wrote:
>
>> curl: (56) Failure when receiving data from the peer:
>>
>> Here is the trace/debug information from CURL and SSH2r:
>
> This seems like a libssh2 issue I think we should proceed with on the
> libssh2 list.
>
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-26