curl-users
Re: ftps hangs
Date: Thu, 3 Feb 2011 14:07:34 +0100 (CET)
On Thu, 3 Feb 2011, Robert Bednar wrote:
> My troubleshooting has revealed that while I can RECEIVE a file via FTPS,
> I'm not able to return a simple directory LIST
That's really odd. In curl's view, there really is very little difference
between a file and a directory listing. A directory doesn't have a known size
but a file generally does, that's about the only difference...
> I moved my examples to the command line. I can see where the directory list
> DOES come back.... but them Curl hangs....and never returns to the shell
> with an exit code. I've tried various options to force different modes
> --disable-epsv or passive mode...connection time outs....maximum connect
> time etc. I tried listing very long directories that require several
> "packets" as seen in the trace log...and the entire directory listing comes
> through perfectly....and then hangs when Curl should be setting an exit
> code.
It sounds as if the data connection doesn't get closed, or that the proper
response header isn't received on the control connection.
If it had been the other way around I could perhaps have guessed that the
control connection timed out, but I assume a directory listing is generally
rather quick...
> Trace and Verbose isn't really helping. Everything looks fine....right up
> to the point where the listing has completed and it just hangs inexplicably.
Hm. This seems to then imply that it is rather on SSL or TCP layer where the
problem happens.
Can you do directory ftps transfers using other tools against this server?
> Why would changing the range by one byte cause the command to hang?
Because libcurl doesn't get the final byte/shutdown/closure of the SSL/TCP
connection? If you set a limited range, libcurl will by itself decided when to
stop and terminate the data connection.
> Strangely this problem seems to manifest itself on my Fedora 10 system.
> I've tried Curl 1.16.x -- Curl 1.19.x and now....a build of the most recent
> 1.21.3 all to no avail.
They're all actually version 7.x.y (seven), not 1.x.y (one)...
What SSL library do you build curl to use? (curl -V shows). A useful test
would be to try a different one to see if the problem still is present or gets
fixed, Also, Fedora 10 sounds a bit old so there's a small chance the lib you
are using might've been fixed since the version you're using.
> My other systems (Redhat 9 based) are running either curl 1.14 to 1.15 and
> do not experience the problem.
So try build the same version from source on such a system and see if the
problem appears or not!
-- / daniel.haxx.se ------------------------------------------------------------------- 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.htmlReceived on 2011-02-03