2

I am attempting to FTP many files from a VAX/VMS server to a local PC via the mget command. It works for several files, but fails after too many files because the remote server closes the connection. It is not expected that this is due to administrative controls - it fails after a "random" number of files after several attempts with different types of files. It seems ASCII mode has the problem earlier than BINARY file transfer mode.

Say I want to transfer many (>100) ASCII files from the VAX/VMS machine to my local PC that have extension ASC. The following records my commands and the failure.

ftp remote.server.location.com
Connected to remote.server.location.com.
220 remote.server.location.com FTP Server (Version 5.6) Ready.
Name (remote.server.location.com:user1pc): user1

331 Username user1 requires a Password
Password:
230 User logged in.
Remote system type is VMS.
ftp> cd [.DIRECTORY.OF.INTEREST]
250-CWD command successful.
250 New default directory is DISK1:[USER1.DIRECTORY.OF.INTEREST]
ftp> ascii
200 TYPE set to ASCII.
ftp> prompt off
Interactive mode off.
ftp> mget *.ASC
local: FILE1.ASC;1 remote: FILE1.ASC;1
200 PORT command successful.
150 Opening data connection for DISK1:[USER1.DIRECTORY.OF.INTEREST]FILE1.ASC;1 (198.162.0.4,58057) (1120 bytes)
226 Transfer complete.
1101 bytes received in 0.015 seconds (73390 bytes/s)
local: FILE2.ASC;1 remote: FILE2.ASC;1
200 PORT command successful.
150 Opening data connection for DISK1:[USER1.DIRECTORY.OF.INTEREST]FILE2.ASC;1 (198.162.0.4,58057) (1120 bytes)
226 Transfer complete.
1101 bytes received in 0.015 seconds (73390 bytes/s)
local: FILE3.ASC;1 remote: FILE3.ASC;1
200 PORT command successful.
150 Opening data connection for DISK1:[USER1.DIRECTORY.OF.INTEREST]FILE3.ASC;1 (198.162.0.4,58057) (1120 bytes)
226 Transfer complete.
1101 bytes received in 0.015 seconds (73390 bytes/s)
...
421 Service not available, remote server has closed connection
local: FILE1002.ASC;1 remote: FILE1002.ASC;1
ftp: No control connection for command
ftp: No control connection for command
local: FILE1003.ASC;1 remote: FILE1003.ASC;1
ftp: No control connection for command
ftp: No control connection for command
local: FILE1004.ASC;1 remote: FILE1004.ASC;1
ftp: No control connection for command
ftp: No control connection for command

After this, I cannot even logon to the remove VAX/VMS server for several minutes, through FTP or otherwise (e.g. telnet).

I've broken up the problem into smaller pieces (fewer files) and been successful at FTP transferring say 50 files at a time.

Thanks.

1
  • Check server-side log. Check also any firewall on the way, it may block your IP after too many connections. Oct 7 '15 at 9:33
0

I found that the solution is simply to use passive mode rather than the default active mode. The difference between the two modes is explained here: https://stackoverflow.com/questions/1699145/what-is-the-difference-between-active-and-passive-ftp

Passive mode is engaged by typing at the ftp prompt

passive on

I am able to transfer an indefinite number of files using passive mode. I'm unsure of the detailed reason why this works, but tried it because I suspected that the data channel was being overwhelmed in active mode.

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.