cURL / Mailing Lists / curl-users / Single Mail

curl-users

cURL process hangs on ftp upload/download operations.

From: Yura Kaidalov <kaidalov_at_gmail.com>
Date: Thu, 24 May 2012 16:21:37 +0300

Hello

cURL process hangs on ftp upload/download operations on Windows. Such hangs
happens several times per day. Here's details:
curl version is:
curl 7.23.1 (i386-pc-win32) libcurl/7.23.1 OpenSSL/1.0.0 libssh2/1.0
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp
scp sftp smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL

command line is: curl.exe -u uname:password --connect-timeout 180 --trace
__trace.out -T source.dat ftp://hostname/target.dat

content of __trace.out:
== Info: About to connect() to hostname port 21 (#0)
== Info: Trying XX.XX.XX.XX... == Info: connected
<= Recv header, 27 bytes (0x1b)
0000: 32 32 30 20 4d 69 63 72 6f 73 6f 66 74 20 46 54 220 Microsoft FT
0010: 50 20 53 65 72 76 69 63 65 0d 0a P Service..
=> Send header, 12 bytes (0xc)
0000: 55 53 45 52 20 65 73 74 61 72 0d 0a USER uname..
<= Recv header, 34 bytes (0x22)
0000: 33 33 31 20 50 61 73 73 77 6f 72 64 20 72 65 71 331 Password req
0010: 75 69 72 65 64 20 66 6f 72 20 65 73 74 61 72 2e uired for uname.
0020: 0d 0a ..
=> Send header, 19 bytes (0x13)
0000: 50 41 53 53 20 53 74 61 72 45 61 67 6c 65 21 21 PASS XXXXXXXXXXX
0010: 21 0d 0a X..
<= Recv header, 27 bytes (0x1b)
0000: 32 33 30 20 55 73 65 72 20 65 73 74 61 72 20 6c 230 User uname l
0010: 6f 67 67 65 64 20 69 6e 2e 0d 0a ogged in...
=> Send header, 5 bytes (0x5)
0000: 50 57 44 0d 0a PWD..
<= Recv header, 36 bytes (0x24)
0000: 32 35 37 20 22 2f 65 73 74 61 72 22 20 69 73 20 257 "/uname" is
0010: 63 75 72 72 65 6e 74 20 64 69 72 65 63 74 6f 72 current director
0020: 79 2e 0d 0a y...
== Info: Entry path is '/uname'
=> Send header, 6 bytes (0x6)
0000: 45 50 53 56 0d 0a EPSV..
== Info: Connect data stream passively
<= Recv header, 36 bytes (0x24)
0000: 35 30 30 20 27 45 50 53 56 27 3a 20 63 6f 6d 6d 500 'EPSV': comm
0010: 61 6e 64 20 6e 6f 74 20 75 6e 64 65 72 73 74 6f and not understo
0020: 6f 64 0d 0a od..
== Info: disabling EPSV usage
=> Send header, 6 bytes (0x6)
0000: 50 41 53 56 0d 0a PASV..
<= Recv header, 51 bytes (0x33)
0000: 32 32 37 20 45 6e 74 65 72 69 6e 67 20 50 61 73 227 Entering Pas
0010: 73 69 76 65 20 4d 6f 64 65 20 28 31 30 2c 31 30 sive Mode (10,10
0020: 30 2c 33 37 2c 31 36 31 2c 31 33 2c 31 35 34 29 0,37,161,13,154)
0030: 2e 0d 0a ...
== Info: Trying XX.XX.XX.XX... == Info: connected
== Info: Connecting to XX.XX.XX.XX (XX.XX.XX.XX) port 3482
=> Send header, 8 bytes (0x8)
0000: 54 59 50 45 20 49 0d 0a TYPE I..
<= Recv header, 20 bytes (0x14)
0000: 32 30 30 20 54 79 70 65 20 73 65 74 20 74 6f 20 200 Type set to
0010: 49 2e 0d 0a I...
=> Send header, 22 bytes (0x16)
0000: 53 54 4f 52 20 6d 63 61 72 74 5f 66 74 70 5f 33 STOR xxxxxxxxx_x
0010: 2e 74 78 74 0d 0a .txt..
<= Recv header, 54 bytes (0x36)
0000: 31 32 35 20 44 61 74 61 20 63 6f 6e 6e 65 63 74 125 Data connect
0010: 69 6f 6e 20 61 6c 72 65 61 64 79 20 6f 70 65 6e ion already open
0020: 3b 20 54 72 61 6e 73 66 65 72 20 73 74 61 72 74 ; Transfer start
0030: 69 6e 67 2e 0d 0a ing...
=> Send data, 4 bytes (0x4)
0000: 74 65 73 74 data

My questions are: why does cURL hangs? and how can I prevent these hangs?

Thanks,
Yura

-------------------------------------------------------------------
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 2012-05-24