ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post here if you experience file transfer problems or unexpected errors.
I have this error when i try to download a file :

***** GETFILE Error #426: Cannot download remote file AJPNLF.txt.
***** The server said: Connection closed; transfer aborted.


It's a file About 70Mo.
I try the ":retrydownload" method but it failed again and again.
Same result with passive mode enabled or not.

Anybody have this error and a solution please ?

thank you
Could you post the script output using verbose mode (put VERBOSE(ON) on the top of the script and run again)
It appears there is a timeout (30s), is there a solution ?

After use VERBOSE(ON) please find the result :
GETFILE("test.zip")

PASV
227 Entering Passive Mode (192,168,100,1,18,139).
Opening data connection to 192.168.100.1 Port: 4747
LIST
125 Data connection already open; Transfer starting.
1146 bytes transferred. (N/A/s) (0 ms)
226 Transfer complete.
Downloading................. test.zip
SIZE test.zip
213 39730569
PASV
227 Entering Passive Mode (192,168,100,1,18,140).
Opening data connection to 192.168.100.1 Port: 4748
RETR test.zip
125 Data connection already open; Transfer starting.
Transfer Timeout (30s). Closing data connection.
12270145 bytes transferred. (131 Ko/s) (00:01:30)
426 Connection closed; transfer aborted.
thank you
Hello,

It seems to be a firewall issue. ScriptFTP cannot connect to the server's port 4748 to transfer the file contents. If you have other FTP clients in your computer that work, try setting ScriptFTP as an allowed application in the firewall configuration.
Hello,

Thank you for your response, but why the transfer worked after some retry ?
If it was a firewall issue, the transfer never worked.

Here the transfer begin and failed because a timeout.
Thank you for your response, but why the transfer worked after some retry ?
Because the files are not always transferred using the same TCP port. When ScriptFTP requests a file transfer (download or upload) the server tells ScriptFTP which port should it use. Then ScriptFTP connects to that port and put or gets the file content. Your problems does not happen always because sometimes the FTP server gives to ScriptFTP a port number that it works and sometimes it gives a port number that it is blocked.

If you have access to the FTP server. Check a configuration parameter called "port range" or something with a similar name.

For example, your server says:
227 Entering Passive Mode (192,168,100,1,18,140).
which means, ok, connect to the port 4748 at 192.168.100.1 to transfer the file contents. 4748 is (18*255+140)

You will notice that the port number changes in every file transfer.