Ftp hangs


 
Thread Tools Search this Thread
Special Forums IP Networking Ftp hangs
# 1  
Old 05-13-2015
Ftp hangs

On Oracle Linux 5, 64 bit (derivative of RHEL) ... I have a shell script that runs every Sunday, that ftp's a bunch of files from server 'prod' to server 'test'. Script executes on 'test'. This has been running for YEARS with no problem. Normally the FTP step takes about 1.5 to 2 hours. (pulls a lot of fairly large files). The only actual 'get' command is a single mget with a wild card file spec, so it is never looking for a specific file, just everything in the source directory. This last weekend we physically relocated the data center. Packed up servers, SAN, etc, trucked it a few miles, and put it all back together. Evertyihing from that seems to be working fine, but it needs to be said in the interest of full disclosure of "what's changed". So, on Sunday, due to the move I'm watching things a lot closer, and this job is still in the ftp step at 17:30 -- about 2 hours overdue. And the log file it writes (redirecting stdout) has a time stamp of 15:30 - so nothing written to it in 2 hours. At that point I killed the job. As a diagnostic, and to give real-time visibility to my network admin, I kicked of the job again yesterday afternoon just before leaving for the day. This morning it was still 'running'. It was stuck at the same file as was the original run. This file is neither the first nor last to be transferred. It is neither the first nor the last one created by the job that created it. The creating job reported no issues. Permissions on the file are the same as all the others. I'd think if the file were internally corrupted, ftp wouldn't really know or care, he's just reading whatever is there. I'm not sure where to turn next and am open for any ideas.
# 2  
Old 05-13-2015
Firewall?
Normally it needs port 21 to the FTP server and port 20 (ftp-data) backwards.
Check with telnet
Code:
ftpserver$ telnet ftpclient 20

# 3  
Old 05-13-2015
Are the files transferring at all? If it's just very slow, I would look at network speed settings. If the switch and the card in your server do not agree, then there will be serious interference. We had a server that was plugged into a switch that forced the port to be 100M full duplex. The card in the server was only capable on 10M half duplex.

Everything was fine until we tried an FTP when the volume of traffic clobbered it. Telnet users were getting 2-3 seconds response times to key-strokes and other horrible things, yet the server's CPU was fine. I had another where we replicate data cross site. After a powerdown the switch lost it's temporary config forcing the port speed to 1Gb and dropped it to 100M with similar consequences.


Can you find a command like entstat that can give you the detail about how your cards are configured? You can then discuss them with the network people over speed settings. They may also need to check all the hops involved in the process.

Here is this site's man page for entstat




Robin

Last edited by rbatte1; 05-13-2015 at 01:44 PM.. Reason: Grammar
# 4  
Old 05-13-2015
Quote:
Originally Posted by MadeInGermany
Firewall?
Normally it needs port 21 to the FTP server and port 20 (ftp-data) backwards.
This occurs while processing the 'n'th file during an 'mget'. If it were firewall/port, it would never get that far.

---------- Post updated at 04:54 PM ---------- Previous update was at 04:51 PM ----------

Quote:
Originally Posted by rbatte1
Are the files transferring at all? If it's just very slow, I would look at network speed settings.
Robin
Yes, at the time of the hang, it has already processed well over a dozen files of similar size on the same 'mget' command. Up to that point, all files transferred in reasonable time.

One thing I hadn't noticed when I first posted .. on both runs it hung on the same file.
# 5  
Old 05-14-2015
Could the file actually be a pipe (with no input process) or a link that is confusing it?

Is the data transfer rate good up to that point?



Robin
# 6  
Old 05-14-2015
I remember a problem that a certain file got stuck during transfer at a certain point.
Regardless if svn or ftp was used. It turned out the problem was with the MPLS provider - who finally solved it.
# 7  
Old 05-14-2015
Just an update to all ... two batch runs (shell script) using 'mget' were able to succesfully transfer a few dozen files before stalling out on the same file each time. After killing the ftp, the file in question is in the target directory, and at first glance looks good .. it's file size is comparable to all of the others - in the 3.5 to 4.5 GB range. But comparison to the file on the source server shows the transferred file is still a few GB short of complete. Most of these files transfer in about 5 minutes.

Today I tried to pull it manually. Started ftp at a command line and did a simple 'get' on the one file. After 20 minutes I killed it. I also did a simple get on another file from the same set and it completed in about 4 minutes, exactly as expected. So it would appear that there is something about the individual file, but I don't know what it would be. It is part of an Oracle database backupset - created by oracle's rman utility. I ran an rman 'verify' against it and it came up clean from that standpoint.

So, I can conclude ..
  1. since it always hits on that one file and only that one file, I can eliminate transient network issues.
  2. since it occurs on that file whether as part of a batch transfer or just the single file, I can eliminate any 'ftp flooding' that I've seen reference to here and there.

At this point I'm just going to let the normal weekend process run again on schedule, but if anyone has any good theories that fit all of the observations so far, I'd be willing to entertain them. If not, I'll have to figure the problem has been found to be off-topic for this forum.

Last edited by rbatte1; 05-15-2015 at 06:14 AM.. Reason: Set LIST=1 tags instead of plain text numbered list.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Ftp script hangs for first time,but works every second time

Hi I have an ftp script which works fine when i execute through a test scheduler(UC4), but when i run it through the prod scheduler(UC4), it hungs indefinetely, when we cancel the job and re-run it it works perfectly fine. here is the code,, any idea why this is happening ???? ... (1 Reply)
Discussion started by: selvankj
1 Replies

2. Solaris

Server Hangs

I have a Sun-Fire-V210, the Server hangs for sometime and evn console wont be abled to access and after sometime the server comes back active. the messages file shows this , whats causing this ? # tail -500 messages Jan 25 07:02:16 xxxxxxxxxxxxx Corrupt label; wrong magic number Jan 25... (2 Replies)
Discussion started by: Sojourner
2 Replies

3. HP-UX

bdf hangs

hi, bdf command hangs but before it, it lists all the fstab content, so i cannot find the reason... could anybody give me any clue?? thanks a lot for your attention. regards Pablo i attach syslog Jan 14 16:30:00 sv23 vmunix: hp_dlpi_wput:Received an unrecognized primitive: 101d... (7 Replies)
Discussion started by: pabloli150
7 Replies

4. UNIX for Advanced & Expert Users

SSH hangs

Hi all, At a little bit of loss here. I have a Linux box (Redhat Enterprise 4) that has been working flawlessly for a while, that is until late Tuesday when none of the users could ssh into it. The machine is in a DMZ over which I have no control of the network settings. Here is the debug output... (6 Replies)
Discussion started by: ccj4467
6 Replies

5. Solaris

System hangs

Hi, today when i started the OS Sun Solaris 10 it hangs on initialization. Following was shown in the end of the screen Initializing system Please wait.... * Please help? (3 Replies)
Discussion started by: malikshahid85
3 Replies

6. Solaris

Explorer hangs

Hi Guys, Anyone encontered a problem where when you run your SUN explorer, it hangs at sysconfig? I am having this problem for some of my servers. rgds, (1 Reply)
Discussion started by: ronny_nch
1 Replies

7. Shell Programming and Scripting

Script Hangs!

Hi, I have script which is based on TCL and expect. It is written to test my code. It usually runs fine for a while and hangs after sometime. Code snippet set l_temp_timeout $timeout OUTPUT_LOG2 2 >>>$expect_out(buffer)<<< OUTPUT_LOG2 2... (2 Replies)
Discussion started by: naveenpn
2 Replies

8. UNIX for Dummies Questions & Answers

rcp and ftp hangs

Hi there, We I attempt to rcp/ftp data from server A to server B. It copies until halfway and throw out the error: rcp: connection lost ftp netin: Connection reset by peer 421 Service not available, remote server has closed connection However, when rcp/ftp from server A to server C, it... (1 Reply)
Discussion started by: *Jess*
1 Replies

9. Filesystems, Disks and Memory

server Hangs during FTP transfer

We are backing up a oracle database by copying the datafiles from one server to another using FTP. while in the middle of the transfer the destination server closes the connection and it sort of hangs. After this we are not able to log onto the destination server using any other user apart from... (0 Replies)
Discussion started by: sgoundar
0 Replies

10. UNIX for Dummies Questions & Answers

ftp hangs on file size = 0

I have an ftp process which runs every 10 minutes between Unix and an NT box. Normally it works, but when the script tries to get a file from NT that has a length of 0, the ftp process hangs (as if it is still waiting for the end of the file). This is the script... (3 Replies)
Discussion started by: mheinrich
3 Replies
Login or Register to Ask a Question