0

I have setup a backup server with centos 6, and everything is working fine. I am using pure-ftpd for ftp server, and I can upload and download files to server and from.

Problem occurs when I try to send one big file from other server to this backup server. The transfer is working, if the files are less then 800mb~1000mb, but if I try to upload bigger file it hangs up while transferring. I dont get any error message, it just stops and I notice when putty show me error timeout message, or if I login to backup server and see that upload has been stopped.

I have tried to upload from that other server same file to third server and it was ok, but when I try to upload it to my backup server it hangs up. There is no pattern when will it stop, sometimes it is on 0.9GB, 1.2GB, 1.5GB, 1.8GB. The file size is 2.2GB.

File is compressed and it is tar.gz.

I have changed 3 lan cables, one was supplied by internet provider but still same problem. Router is Cisco epc3925.

I have tried with several lan cards, then changed computer, and finally used brand new computer with fresh install centos 6 today but still same problem.

If i try uploading files that are less than 800 mb, the process finishes successfully.

Also I have created file of 3GB on backup server, and then tried to upload it connecting via ftp localhost and it was successful.

I have connected from other computer in same network via ftp and have successfully uploaded file of 4GB with total commander, but I need to upload from computer which is not in this network.

I need to add that I have tried to transfer same file via sftp and scp and it was successful, but it was 4 times slower then ftp.

When I check network connection while uploading I got this results

source

tcp 1 75921 173.249.154.250:44672 89.216.114.136:30201 ESTABLISHED

destination

tcp 0 0 192.168.0.2:21 173.249.154.250:47484 ESTABLISHED 1736/pure-ftpd (UPL tcp 0 0 192.168.0.2:30201 173.249.154.250:44672 ESTABLISHED 1736/pure-ftpd (UPL tcp 0 196 192.168.0.2:22 178.212.88.183:54641 ESTABLISHED 1696/sshd

This are results while staling

source

tcp 1 75921 173.249.154.250:44672 89.216.114.136:30201 CLOSING -

destination

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 192.168.0.2:22 178.212.88.183:54641 ESTABLISHED 1696/sshd

Please help, I have read everything I could find, and I dont know what else to do.

  • What say pure-ftpd logfile ? also, is the FTP server behind a firewall ? – krisFR Apr 1 '14 at 21:21
  • This rings a bell in my memory from a few years back, but I'll be darned if I can remember the details. – Michael Martinez Apr 1 '14 at 21:24
  • I have only centos provided firewall, iptables. – emir Apr 1 '14 at 21:27
  • As it seems you are using a residential class device, have you asked your internet provider if they are doing anything to prevent large file transfers on a residential quality line? – Rex Apr 1 '14 at 22:03
  • Have a look here download.pureftpd.org/pure-ftpd/doc/FAQ Search for Slowdowns and lags on the page and check if this could applies to your case – krisFR Apr 1 '14 at 22:08
1

A flaky network cable shouldn't cause the transfer to stall permanently. If the problem was a network cable, the transfer should resume when connectivity was restored. The connection may break if the network connection is lost for long enough for the TCP connection to time out, which will take several minutes.

The symptoms you describe are however consistent with problems caused by stateful middleboxes. A stateful middlebox could be a router performing any type of NAT or a stateful firewall.

So in a search for a root-cause, I would try to identify any potentially stateful middleboxes between client and server. Other than searching for root-causes, it may also be worthwhile to search for workarounds.

There are transfer protocols, which can resume a partial transfer. Then even if the connection breaks, you should be able to get the file through in 2 or 3 tries. One file transfer tool, which could do that would be rsync.

  • SCP and sftp file transfer is working. The network connection is not broken when ftp upload stops. I have logged in via shell and I have been monitoring upload until it stops. When it stops I still have access to server so the connection was not lost, only the upload freezes. – emir Apr 1 '14 at 21:36
  • When the upload freezes, it would be interesting to see what the TCP state of the data connection used by FTP looked like. I would first try to identify the connection in netstat output on both ends. If the problem is indeed on a stateful middlebox, then I would expect the sending end of the TCP connection to have a full send-queue and the receiving end to have an empty receive-queue. It would also be interesting to observe the network traffic to see if any packets are getting lost. The most interesting would a few seconds before and after the connection stalls. – kasperd Apr 1 '14 at 21:41
  • I don't know how to do it, if you could help me I would appreciate. – emir Apr 1 '14 at 21:45
  • When the connection stalls try to run netstat -ntp on both client and server. Try to identify the TCP connection used for FTP data in both outputs. – kasperd Apr 1 '14 at 21:46
  • when the connection stalls, I cant check on source server because it is not responding. Only if I login again to that server. I can check on destination server and I will write the output. – emir Apr 1 '14 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.