cURL / Mailing Lists / curl-users / Single Mail

curl-users

sftp--curl: (56) Failure when receiving data from the peer.

From: Michael Zhang <mxz9102_at_hotmail.com>
Date: Tue, 18 Feb 2014 10:58:06 -0800

Help please!!!
I was using curl 7.35 to download a file from a JScape sftp server but got a problem. The connection was closed after 64000 bytes. What's received is only partial file. Here is a simplified log file.
The returned error message is curl: (56) Failure when receiving data from the peer.
== Info: Hostname was NOT found in DNS cache== Info: Trying 10.10.10.10...== Info: Connected to ftp.test.com (10.10.10.10) port 22 (#0)== Info: SSH MD5 fingerprint: 762ebf15bbdcebdb4b70e608800caa7d== Info: SSH authentication methods available: password== Info: Initialized password authentication== Info: Authentication complete<= Recv data, 2000 bytes (0x7d0)correct data....<= Recv data, 2000 bytes (0x7d0)correct data<= Recv data, 2000 bytes (0x7d0)correct data== Info: Closing connection 0
To do a comparison, I ran the same curl program to download the same file from SUSE sftp server and the file was fetched without any problem.I compared its log file with the above one and found the difference between them. They are all same at the beginning until when the problem happened. There was one trunk 1536 byte received just at the problem point. It seems that this trunk caused transfer failure because all other trunks are 2000 bytes. I also tried curl 7.43 and reproduced the same problem.
"<= Recv data, 1536 bytes (0x600)"
Could anyone help me to figure out why this abnormal trunk happened and how to resolve this issue? It seems that curl was expecting 2000 bytes for the trunk and it reported an error because only 1536 bytes were received.
== Info: Authentication complete<= Recv data, 2000 bytes (0x7d0)correct data....<= Recv data, 2000 bytes (0x7d0)correct data<= Recv data, 2000 bytes (0x7d0)correct data<= Recv data, 1536 bytes (0x600)correct data<= Recv data, 2000 bytes (0x7d0)correct data....== Info: Connection #0 to 10.10.10.9 left intact

Sincerely, Michael

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-02-18