cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Trying to download and remove files from server via vb.net -need help

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 2 Jul 2008 10:32:06 -0700

On Wed, Jul 02, 2008 at 07:44:01AM -0400, lists_at_waynesplace.com wrote:
> >I suggest you check the return code from the Perform() call. It will likely
> >give you a very specific reason for the failure. Failing that, enable
> >debug logs and look through the protocol trace to track the source of the
> >problem.
> >
>
> With the sleep removed here is some debug output from in loop:
> ==============================================================
> 170 files, on # 9...Return code is: 7

Return code 7 is CURLE_COULDNT_CONNECT which implies that the remote server
is not listening to the desired port.

> . (several good transfers)
> .
> Connection #0 to host YYY left intact
> Re-using existing connection! (#0) with host YYY
> Connected to YYY (YYY) port 21
> Request has same path as previous transfer
> EPSV
> 229 Entering Extended Passive Mode (|||55483|)
> Trying YYY...
> Connection refused

That's confirmed by this log. The remote server says to connect to port
55483 and when curl does, the server doesn't answer. Assuming there isn't
a broken firewall in the way, this is a problem with the server.

> 229 Entering Extended Passive Mode (|||55514|)
> Trying YYY...
> connected
> Connecting to YYY (YYY) port 55514
> Connected the data stream with PASV!
> TYPE I
> 200 Type set to I
> SIZE pb002229.png
> 213 136787
> RETR pb002229.png
> 150 Opening BINARY mode data connection for pb002229.png (136787 bytes)
> Getting file with size: 136787
> transfer closed with 136787 bytes remaining to read
> Remembering we are in dir /YYY
> Received only partial file: 0 bytes
> Closing connection #0
> ***->170 files, on # 1...Return code is: 18

Return code 18 is CURLE_PARTIAL_FILE, which means that not all the data
was transferred. In this case, the server says there are 136787 bytes in the
file but it refuses to send them for some reason. It sounds like a fault
in the server again.

> Questions:
> - I thought it would reuse the connection since it has not been closed yet - so why is it trying to connect for every transfer? (It even says reusing existing connection #0 with host YYY)

That's the way the FTP protocol works. The control connection is reused, but
every data transfer requires that a new connection be established.

> - Why after the QUOTE command (DELE) does it fail to download any files?

Probably yet another defect in the server, by the looks of it.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-07-02