FTP issue

Hello all,

FTP times out when I transfer large files. Small files get transffered fine.

small files
--------

-bash-3.1$ ftp -i cldevoradb01
Connected to cldevoradb01.enterprisenet.org.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (cldevoradb01:oracle): oracle
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /d1/oradata/INTPL
250 Directory successfully changed.

ftp> mget *.DMP
local: BIZFACTS200909.DMP remote: BIZFACTS200909.DMP
227 Entering Passive Mode (10,9,10,38,130,128)
150 Opening BINARY mode data connection for BIZFACTS200909.DMP (675840 bytes).
226 File send OK.
675840 bytes received in 0.73 seconds (9e+02 Kbytes/s)
local: CP200909.DMP remote: CP200909.DMP
227 Entering Passive Mode (10,9,10,38,166,74)
150 Opening BINARY mode data connection for CP200909.DMP (196608 bytes).
226 File send OK.
196608 bytes received in 0.43 seconds (4.4e+02 Kbytes/s)
local: SUPP200900.DMP remote: SUPP200900.DMP
227 Entering Passive Mode (10,9,10,38,29,225)
150 Opening BINARY mode data connection for SUPP200900.DMP (6082560 bytes).
226 File send OK.
6082560 bytes received in 3.1 seconds (1.9e+03 Kbytes/s)

large files - time out
--------------------

ftp> mget B*.DBF
local: BANKBR200912.DBF remote: BANKBR200912.DBF
227 Entering Passive Mode (10,9,10,38,71,106)
421 Timeout.
local: BIZFACTS200912.DBF remote: BIZFACTS200912.DBF
No control connection for command: No such file or directory
Passive mode refused. Turning off passive mode.
No control connection for command: No such file or directory
local: BLOCK200900.DBF remote: BLOCK200900.DBF
No control connection for command: No such file or directory
ftp> bye
-bash-3.1$

Both source & target hosts are RHEL5 64 Bit...

Am I missing something here? Should I configure FTP to increase the time out? I'm new to system administration. Any pointers would be helpful.

Thanks for your time.

The remote side is timing out, not your side, that is what return code 421 means:

421 Service not available, closing control connection. 
      This may be a reply to any command if the service knows it must shut down. 

This is considered transient - in the sense that you could reconnect and get download another file right away. Something on the remote side forced it to shutdown. Look at the ftpd logs on the remote. I vote for a remote timeout.

The 421 is generated on the remote side. Not your side.

Thanks Jim for your response. I'll request my SA to look into it. To bypass this issue I used scp -c blowfish *.DBF <target_IP>:<path>.

If scp works so should sftp

sftp -C nodename<<EOF
cd somedirectory
put *.DBF
exit
EOF

sftp -C uses gzip to first compress the file - with OpenSSH

Thanks Jim. That was a good piece of code that I've added to my script archives.