cURL / Mailing Lists / curl-library / Single Mail

curl-library

Weird FTP Connect Error Bug

From: Jofell Gallardo <jofell_at_xackup.org>
Date: Mon, 17 Sep 2007 01:30:54 +0800

Hi guys, this error might be familiar to you guys, but I tried searching the
web about this. First off, here are the logs.
(I censored a few details)

2007-09-17 01:04:05.529 Bandwagon FTP[13584] Started callCurl
2007-09-17 01:04:05.529 Bandwagon FTP[13584] Savepath:
/Users/terpua/Library/Application Support/BWFTP/downcache/to and fro.mp3
2007-09-17 01:04:05.529 Bandwagon FTP[13584] Finished load in background
* About to connect() to ****.gridserver.com port 21 (#0)
* Trying 64.13.192.121... * connected
* Connected to ****.gridserver.com (**.**.**.**) port 21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 220-You are user number 76 of 800 allowed.
< 220-Local time is now 10:05. Server port: 21.
< 220-This is a private system - No anonymous login
< 220 You will be disconnected after 15 minutes of inactivity.
> USER ****
< 331 User **** OK. Password required
> PASS ****
< 230-User **** has group access to: 12945
< 230 OK. Current directory is /
> PWD
< 257 "/" is your current location
* Entry path is '/'
> CWD users
< 250 OK. Current directory is /users
> CWD .home
< 250 OK. Current directory is /users/.home
> CWD tpitunes
< 250 OK. Current directory is /users/.home/tpitunes
> CWD BWFTP
< 250 OK. Current directory is /users/.home/tpitunes/BWFTP
> CWD 3845PJ0J3LL
< 250 OK. Current directory is /users/.home/tpitunes/BWFTP/3845PJ0J3LL
> CWD 406
< 250 OK. Current directory is /users/.home/tpitunes/BWFTP/3845PJ0J3LL/406
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (64,13,192,121,228,230)
* couldn't connect to host
* Closing connection #0
2007-09-17 01:04:08.380 Bandwagon FTP[13584] Error: couldn't connect to host
2007-09-17 01:04:08.380 Bandwagon FTP[13584] Headers {
    "220-local time is now 10:05. server port" = "21.";
    "230-user serveradmin_at_ridethebandwagon.com has group access to" = "
12945 ";
} and Error couldn't connect to host

And it cycles that way. What's weirder is it always happens on the 230th, or
231st, or
232nd file download (meaning it already downloaded 230+ items already when
this
error happens), and for 5 days of monitoring, it always happens this way.

Another weird thing is that it seems to have a "premonition" before this
happens,
meaning it shows up that it has somehow disconnected because of timeout
reasons
(my FTP timeout is 10 seconds), then resumes cleanly, then after that, I get
these
error messages:

Error couldn't connect to host

And then it tries to "resume" starting on the first byte (which I might've
miscoded, but
it was just setting the URL and setting options like so:)

curl_easy_setopt(chandle, CURLOPT_RESUME_FROM, currsize);

where currsize is the current downloaded size of the file. I already tried
doing curl_easy_cleanup
and also tried restting the handle, but the error still happens.

Please help me out with this. I'm currently using libcurl v7.16.4. My hair
is thinning and
I'm afraid I might get bald because I'm pulling my hair off because of this
:(

I could give you more info about my code, but I want you guys to know that I
just do the basics
(just setting options and run the download bit).
Received on 2007-09-16