cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Corruption with uploads using sftp

From: Jade Rubick <jade_at_volunteersolutions.org>
Date: Fri, 29 Aug 2008 10:37:47 -0700

Thanks for your reply, Daniel.

Here is the details with debugging on:

$ !809
/usr/local/bin/curl --user user:password --upload-file /web/vs/files/
shared/public/solr-vs--lucene--server--solr--vs-ae-vsg-part-1-14533565-
bid10253233741-10253233695-10099.xml -v sftp://my.host.com/
* About to connect() to my.host.com port 22 (#0)
* Trying 1.2.3.4... connected
* Connected to my.host.com (1.2.3.4) port 22 (#0)
* SFTP 0x99a3af8 state change from SSH_STOP to SSH_S_STARTUP
* SFTP 0x99a3af8 state change from SSH_S_STARTUP to SSH_AUTHLIST
* SSH authentication methods available: publickey,password
* SFTP 0x99a3af8 state change from SSH_AUTHLIST to SSH_AUTH_PKEY_INIT
* Using ssh public key file /home/jade/.ssh/id_dsa.pub
* Using ssh private key file /home/jade/.ssh/id_dsa
* SFTP 0x99a3af8 state change from SSH_AUTH_PKEY_INIT to SSH_AUTH_PKEY
* SSH public key authentication failed: Unable to open public key file
* SFTP 0x99a3af8 state change from SSH_AUTH_PKEY to SSH_AUTH_PASS_INIT
* SFTP 0x99a3af8 state change from SSH_AUTH_PASS_INIT to SSH_AUTH_PASS
* Initialized password authentication
* SFTP 0x99a3af8 state change from SSH_AUTH_PASS to SSH_AUTH_DONE
* Authentication complete
* SFTP 0x99a3af8 state change from SSH_AUTH_DONE to SSH_SFTP_INIT
* SFTP 0x99a3af8 state change from SSH_SFTP_INIT to SSH_SFTP_REALPATH
* SSH CONNECT phase done
* SFTP 0x99a3af8 state change from SSH_SFTP_REALPATH to SSH_STOP
* DO phase starts
* SFTP 0x99a3af8 state change from SSH_STOP to SSH_SFTP_QUOTE_INIT
* SFTP 0x99a3af8 state change from SSH_SFTP_QUOTE_INIT to
SSH_SFTP_TRANS_INIT
* SFTP 0x99a3af8 state change from SSH_SFTP_TRANS_INIT to
SSH_SFTP_UPLOAD_INIT
* SFTP 0x99a3af8 state change from SSH_SFTP_UPLOAD_INIT to SSH_STOP
* DO phase is complete
} [data not shown]
   % Total % Received % Xferd Average Speed Time Time
Time Current
                                  Dload Upload Total Spent
Left Speed
   0 3975k 0 0 0 0 0 0 --:--:-- 0:00:04
--:--:-- 0* SSH DISCONNECT starts now
* SFTP 0x99a3af8 state change from SSH_STOP to SSH_SFTP_SHUTDOWN
* SFTP 0x99a3af8 state change from SSH_SFTP_SHUTDOWN to
SSH_SESSION_DISCONNECT
* SFTP 0x99a3af8 state change from SSH_SESSION_DISCONNECT to
SSH_SESSION_FREE
* SFTP 0x99a3af8 state change from SSH_SESSION_FREE to SSH_STOP
* SSH DISCONNECT is done
* Closing connection #0
* Failed sending data to the peer

curl: (55) Failed sending data to the peer

Jade Rubick
Director of Development
Truist
120 Wall Street, 4th Floor
New York, NY 10005 USA
jade_at_volunteersolutions.org
+1 503 285 4963
+1 707 671 1333 fax

www.truist.com

The information contained in this email/document is confidential and
may be legally privileged. Access to this email/document by anyone
other than the intended recipient(s) is unauthorized. If you are not
an intended recipient, any disclosure, copying, distribution, or any
action taken or omitted to be taken in reliance to it, is prohibited.

On Aug 29, 2008, at 6:48 AM, Daniel Stenberg wrote:

> On Thu, 28 Aug 2008, Jade Rubick wrote:
>
>> I recently upgrade curl to 7.18.2 (compiled on FC4 linux
>> 2.6.17-1.2142_FC4smp) in order to take advantage of the ability to
>> connect via Sftp. I compiled it against libssh2-0.18.
>>
>> I have been able to download files correctly, and do directory
>> listings, but when I upload files, files that are more than tiny
>> are corrupted and I get an error instead of successful completion.
>>
>> Any suggestions?
>
> It looks like a bug.
>
>> Current
>> Dload Upload Total Spent
>> Left Speed
>> 0 3975k 0 0 0 0 0 0 --:--:-- 0:00:04
>> --:--:-- 0* Closing connection #0
>> * Failed sending data to the peer
>>
>> curl: (55) Failed sending data to the peer
>
> It seems to fail immediately when it wants to send data. It's really
> hard to tell why based only on this output. I suggest you rebuilt
> both curl and libssh2 with configure --enable-debug and see if that
> gives any further hints in the debug output.
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-08-29