Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.6k views
in .NET FTP by (160 points)
Hi,

We're getting the following error when downloading a load of files using edtFTPnet Free:

DEBUG [FTPConnection] 2 Mar 2011 20:31:56.354 : DownloadFile(xxx)
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.354 : ---> PASV
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.526 : 227 Entering Passive Mode (x,x,x,x,x,x)
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.526 : Server supplied address=x.x.x.x
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.526 : Server supplied port=xxxxx
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.526 : autoPassiveIPSubstitution=True
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.526 : remoteAddr=x.x.x.x
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.526 : Substituting server supplied IP (x.x.x.x) with remote host IP (x.x.x.x)
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.526 : NewPassiveDataSocket(x.x.x.x,xxxxx)
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.698 : ---> RETR xxx
DEBUG [FTPControlSocket] 2 Mar 2011 20:31:56.885 : 150 Opening BINARY mode data connection for xxxx (25035098 bytes).
DEBUG [FTPClient] 2 Mar 2011 20:33:10.280 : Transferred 25035098 bytes from remote host
ERROR [FTPControlSocket] 2 Mar 2011 20:35:10.788 : Read failed ('' read so far)
WARN [FTPClient] 2 Mar 2011 20:35:10.788 : ReadReply failed
WARN [FTPClient] 2 Mar 2011 20:35:10.788 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
WARN [FTPClient] 2 Mar 2011 20:35:10.788 : at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadLine()
WARN [FTPClient] 2 Mar 2011 20:35:10.788 : at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
WARN [FTPClient] 2 Mar 2011 20:35:10.788 : at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransfer()

The error seems to occur after the transfer is complete. Switching to an active connection shows the following (same set of files, but error is on a different file this time):

DEBUG [FTPControlSocket] 2 Mar 2011 21:14:53.644 : NewActiveDataSocket(0)
DEBUG [FTPControlSocket] 2 Mar 2011 21:14:53.644 : ---> PORT x,x,x,x,x,x
DEBUG [FTPControlSocket] 2 Mar 2011 21:14:53.816 : 200 PORT command successful. Consider using PASV.
DEBUG [FTPControlSocket] 2 Mar 2011 21:14:53.816 : ---> RETR xxx
DEBUG [FTPControlSocket] 2 Mar 2011 21:14:54.159 : 150 Opening BINARY mode data connection for xxx (14606358 bytes).
DEBUG [FTPActiveDataSocket] 2 Mar 2011 21:14:54.159 : AcceptConnection() succeeded
ERROR [FTPControlSocket] 2 Mar 2011 21:15:24.818 : Read failed ('' read so far)
WARN [FTPClient] 2 Mar 2011 21:15:24.818 : ReadReply failed
WARN [FTPClient] 2 Mar 2011 21:15:24.818 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
WARN [FTPClient] 2 Mar 2011 21:15:24.818 : at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadLine()
WARN [FTPClient] 2 Mar 2011 21:15:24.818 : at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
WARN [FTPClient] 2 Mar 2011 21:15:24.818 : at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransfer()
DEBUG [FTPClient] 2 Mar 2011 21:15:36.568 : Transferred 14606358 bytes from remote host
DEBUG [FTPControlSocket] 2 Mar 2011 21:15:36.818 : 226 File send OK.

And the client happily continues downloading the other files, despite the error being thrown half-way through. The downloaded file seems fine, but what's throwing the error? The timing of the error in relation to the previously line (2 mins for passive, 30 secs for active) suggests some kind of timeout?

Any help much appreciated.

3 Answers

0 votes
by (162k points)
Yes 2 minutes is the default timeout. Try increasing it to say 4 minutes (set in milliseconds).

Also make sure the server isn't timing out the connection.
0 votes
by (160 points)
Thanks.

The odd thing is that the log message before the timeout for the passive connection says the file has been successfully downloaded, so I don't understand what it's waiting for. Is that just a message from the server to say the download is complete?

Cheers
Richard
0 votes
by (162k points)
Any luck with increasing the timeout in PASV mode?

Is there any correlation with size for the problem, i.e. do smaller files succeed and it only fail on large files?

Do you have access to the server logs?

Categories

...