curl-users
Re: curl hangs after EPSV
Date: Thu, 19 Jun 2008 19:19:24 -0500
On Thu, Jun 19, 2008 at 6:26 PM, Dan Fandrich <dan_at_coneharvesters.com>
wrote:
> On Thu, Jun 19, 2008 at 06:01:09PM -0500, Terra Frost wrote:
> > I'm trying to use curl to upload to a Windows FTP server and am having
> some
> > difficulty.
>
> What version of curl?
7.18.2.
>
> > Here's the command I'm using:
> >
> > curl -T filename.ext -u username:password ftp://10.0.0.101/ -m 10
> >
> > When I do this from another computer (say 10.0.0.102), I get a timeout
> error.
> >
> > As both the FTP server (FileZilla server) and Wireshark reveal, curl is
> > connecting to the FTP server. It sends the login info, does PWD, then
> EPSV,
> > and then hangs. Right before it's about to disconnect, it sends PASV.
> So if
> > the -m parameter were 5, it'd send PASV 5 seconds after everything else
> and
> > then disconnect. If the -m parameter was 10, it'd send PASV 10 seconds
> after
> > everything else and then disconnect.
> >
> > If I omit the -m parameter, PASV gets sent 21 seconds after everything
> else and
> > then the connection is immediately closed.
>
> This description leaves out some valuable information. Can you instead send
> a log of the transfer (use -v or --trace-ascii)?
The logs can be found here:
http://www.frostjedi.com/terra/curl01.txt
http://www.frostjedi.com/terra/curl02.txt
The first one gives a different error in the CLI (stderr?) - "Uploaded
unaligned file size (0 out of 351232 bytes)". I get this error about,
maybe, 10% of the time. The other one (the second one) occurs about 90% of
the time and gives a "Connection time-out" error in the CLI.
> > I'm able to connect via FlashFXP without any problems. One thing I
> noticed
> > when doing this is that FlashFXP never sends EPSV. I tried disabling
> that with
> > the --disable-epsv flag, but that didn't help. I tried --ftp-pasv and
> > --ftp-skip-pasv-ip, too, to no avail.
> >
> > When I try to do it from the same computer (10.0.0.101), however, it
> works.
> > PASV is never sent and the test file I'm trying to upload is uploaded.
>
> Could it be a firewall blocking the data connection?
Maybe, but wouldn't a firewall just block the port? Here, it's able to
connect and even issue a few commands. It just doesn't seem to want to do
anything after that.
Received on 2008-06-20