Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).
no avatar
User

RichardJ

Posts

2

Joined

Thu Mar 03, 2011 7:45 pm

Read failed ('' read so far) after download has completed?

by RichardJ » Thu Mar 03, 2011 7:53 pm

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.
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: Read failed ('' read so far) after download has complete

by support2 » Thu Mar 03, 2011 11:43 pm

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.
no avatar
User

RichardJ

Posts

2

Joined

Thu Mar 03, 2011 7:45 pm

by RichardJ » Fri Mar 04, 2011 12:30 am

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
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

by support2 » Fri Mar 04, 2011 10:14 am

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?

Who is online

Users browsing this forum: No registered users and 22 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron