cpbackup connects to FTP server but connection times-out...

betoranaldi

Well-Known Member
Dec 5, 2007
105
0
66
I have had cpbackup up and running for a few years without any problems. all of a sudden no backups are being transfered to the remote ftp.

Nothing has changed on this remote ftp server.

Looking at the backup log I get the following lines:

Code:
Net::FTP=GLOB(0x000db000)<<< 250 OK. Current directory is /cpbackup/daily
Net::FTP=GLOB(0x000db000)>>> ALLO 173072330
Net::FTP=GLOB(0x000db000)<<< 200 PORT command successful
Net::FTP=GLOB(0x000db000)>>> STOR user.tar.gz
Net::FTP=GLOB(0x000db000): Timeout at /scripts/cpbackup line 764
Net::FTP=GLOB(0x000db000)>>> QUIT
Net::FTP=GLOB(0x000db000): Timeout at /scripts/cpbackup line 765
This happens with all users on this cpanel installation. Anyone have any ideas?
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I have had cpbackup up and running for a few years without any problems. all of a sudden no backups are being transfered to the remote ftp.

Nothing has changed on this remote ftp server.

Looking at the backup log I get the following lines:

Code:
Net::FTP=GLOB(0x000db000)<<< 250 OK. Current directory is /cpbackup/daily
Net::FTP=GLOB(0x000db000)>>> ALLO 173072330
Net::FTP=GLOB(0x000db000)<<< 200 PORT command successful
Net::FTP=GLOB(0x000db000)>>> STOR user.tar.gz
Net::FTP=GLOB(0x000db000): Timeout at /scripts/cpbackup line 764
Net::FTP=GLOB(0x000db000)>>> QUIT
Net::FTP=GLOB(0x000db000): Timeout at /scripts/cpbackup line 765
This happens with all users on this cpanel installation. Anyone have any ideas?
Please toggle the passive mode option in the backup configuration, and then force cpbackup to run once more; immediately following the command please use "tail -f" to follow and watch the cpbackup log file:
Code:
# /scripts/cpbackup --force
If there is a firewall on either of the two servers, please temporarily disable both firewalls while cpbackup is running to ensure they are not interfering.

To further clarify, the FTP passive mode option for cpbackup is found at the following menu path (via WHM) and is labeled as seen below:
WHM: Main >> Backup >> Configure Backup
FTP Backup Passive Mode (required if you are behind a firewall or FTP backups fail)
 

betoranaldi

Well-Known Member
Dec 5, 2007
105
0
66
I followed the directions. It's set to passive and there are no firewall problems.

Now it backed up 3 accounts but all other accounts get the following error:

Code:
Net::FTP=GLOB(0xd489f28)>>> STOR user.tar.gz
Net::FTP=GLOB(0xd489f28): Timeout at /scripts/cpbackup line 764
Net::FTP=GLOB(0xd489f28)>>> QUIT
Net::FTP=GLOB(0xd489f28): Timeout at /scripts/cpbackup line 765
What would cause the script to timeout?

There are plenty of resources on this VPS
 

betoranaldi

Well-Known Member
Dec 5, 2007
105
0
66
Is there anyway to reset everything? only a few backups actually upload to the server. everything else times out.
 

zombo

Active Member
Jan 28, 2004
38
0
156
Austria
I continue this thread since I have exactly the same problem with /scripts/cpbackup since yesterday.
I did not change anything in the configuration.
The logfile says (for all cpanel accounts)
Net::FTP=GLOB(0x1fd3f898)>>> STOR cpaccount.tar.gz
Net::FTP=GLOB(0x1fd3f898): Timeout at /scripts/cpbackup line 764
Net::FTP=GLOB(0x1fd3f898)>>> QUIT
Net::FTP=GLOB(0x1fd3f898): Timeout at /scripts/cpbackup line 765

the lines in the cpbackup perl-file that raise the timeout are
$ftp->put( $targetfile, $remotefile );
$ftp->quit;

that means, connection to the remote backup server opens fine, even the cpaccount.tar.gz file is created but then the upload procedure is blocked by something.

Can anyone help me to trace down this odd failure?
 
Last edited:

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
I continue this thread since I have exactly the same problem with /scripts/cpbackup since yesterday.
I did not change anything in the configuration.
The logfile says (for all cpanel accounts)
Net::FTP=GLOB(0x1fd3f898)>>> STOR cpaccount.tar.gz
Net::FTP=GLOB(0x1fd3f898): Timeout at /scripts/cpbackup line 764
Net::FTP=GLOB(0x1fd3f898)>>> QUIT
Net::FTP=GLOB(0x1fd3f898): Timeout at /scripts/cpbackup line 765

the lines in the cpbackup perl-file that raise the timeout are
$ftp->put( $targetfile, $remotefile );
$ftp->quit;

that means, connection to the remote backup server opens fine, even the cpaccount.tar.gz file is created but then the upload procedure is blocked by something.

Can anyone help me to trace down this odd failure?
As mentioned earlier in this thread, please toggle the FTP Backup Passive Mode option; this may help workaround connectivity issues that could cause the timeout to occur.
 

zombo

Active Member
Jan 28, 2004
38
0
156
Austria
As mentioned earlier in this thread, please toggle the FTP Backup Passive Mode option; this may help workaround connectivity issues that could cause the timeout to occur.
WHM recommends to enable FTP Backup Passive Mode, if you are behind a firewall or FTP backups fail.

I had enabled PASV passive mode and all backups failed since 3 days.
I am behind a csf/lfd firewall and all necessary ports are open.
Now I toogled as you recommended and disabled passive mode.

That is following your advice and against the WHM recommendation.
Then I did a /scripts/cpbackup --force
and now 12 of my 18 accounts are backed up correctly while 6 again did timeout. Those 6 are small accounts. Has my vps gone mad?
:confused:
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
WHM recommends to enable FTP Backup Passive Mode, if you are behind a firewall or FTP backups fail.

I had enabled PASV passive mode and all backups failed since 3 days.
I am behind a csf/lfd firewall and all necessary ports are open.
Now I toogled as you recommended and disabled passive mode.

That is following your advice and against the WHM recommendation.
Then I did a /scripts/cpbackup --force
and now 12 of my 18 accounts are backed up correctly while 6 again did timeout. Those 6 are small accounts. Has my vps gone mad?
:confused:
Thank you for the information. What is your cPanel version number?

In the server firewall configuration, if it's not already setup like this, please white-list the IP address of the FTP server for both inbound and outbound traffic.
 

zombo

Active Member
Jan 28, 2004
38
0
156
Austria
I use WHM 11.26.8 and the latest csf/lfd.

I have added to csf.allow
n.n.n.1 # Manually allowed - Fri Sep 24 21:52:56 2010 (my ftp 1st)
n.n.n.2 # Manually allowed - Fri Sep 24 21:53:55 2010 (my ftp 2nd)
where n.n.n.n are the ip's of my ftp service

actually, I guess the csf rules should be written
tcp: in:d=21:s=n.n.n.1
tcp: out:d=21:s=n.n.n.2
tcp: in:d=49000-59000:s=n.n.n.1
tcp: out:d=49000-59000:s=n.n.n.2
since I do not want to give the ftp service access to non-ftp ports
I have to study the manuals here ... rtfm :)

I will try with PASV mode and without PASV mode and will report later.
 

zombo

Active Member
Jan 28, 2004
38
0
156
Austria
Now, this was quite a time consuming puzzle but after all I am glad I could resolve it myself.

My ftphost has a load balancer that resolves to 2 different IPs (what can be seen by calling #dig ftp.[myftphost].com where myftphost has to be the correct ftp domain).

I have put ......|d={port number...}|s=ftp.[myftphost].com into the csf.dyndns file but the dyndns feature of the csf/lfd firewall opens only one of the two associated IPs. Since the load balancer tried to handle the transfer on both IPs a couple of cPanel accounts always timed out.

The final solution was to allow ports 20, 21 and e.g. 49000-59000 for both IPs that my ftpservice uses in the csf.allow file.

Problem solved. Thanks for your attention anyway.