Hi,
I have an application which starts by downloading a number of files and getting fileinfos from 3 different folders on a remote FTP server (UNIX). I am currently using edtFTPnet-Free V1.3.0 (previously up until about 2-3 weeks ago I was using edtFTPnet-Free V1.2.3).
Over the last 2 months or so users have been experiencing a large number of FTP failures. With some users consistantly experiencing significantly more failures than others (some high volume users have experienced relatively few failures (myself included) while other lower volume users have experienced many failures). In fact one user may experience problems while at the same time others do not. The FTP server Hosts report no issues with the server over the same period.
I changed the code so that files are now only downloaded if the server file is newer than that on the local drive and one folder of three now returns filtered (at source) fileinfos. (There are a maximum of 9 files to download with the largest approximately 200KB. Total download time if all files are to be downloaded is typically 10-15 seconds. With getting the fileinfos from the 3 folders taking the longest time.).
This new startup scheme has improved the situation somewhat but failures still occur.
I have also produced a smaller test code (with more diagnostics) which some of the users have. This is almost identical to the main application except that it downloads the files to a different local folder.
Today one user reported 5 successive failures with the main code - extract from log file follows:
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.015 : ---> SIZE ./htdocs/fymfiles_2/FYMYMNames.ini
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.218 : 213 4663
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.218 : ---> MDTM ./htdocs/fymfiles_2/FYMYMNames.ini
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.421 : 213 20080805054633
DEBUG [FTPConnection] 5 Aug 2008 06:21:27.421 : Combining absolute path 'C:\Keim\tmmp\FYM' with relative path 'C:\Keim\tmmp\FYM\server1\FYMYMNames.ini'
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.437 : ---> PASV
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.718 : 227 Entering Passive Mode (213,171,193,5,228,184)
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.718 : Server supplied address=213.171.193.5
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.718 : Server supplied port=58552
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.718 : Substituting server supplied IP (213.171.193.5) with remote host IP (213.171.193.5)
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.718 : NewPassiveDataSocket(213.171.193.5,58552)
DEBUG [FTPControlSocket] 5 Aug 2008 06:21:27.921 : ---> RETR ./htdocs/fymfiles_2/FYMYMNames.ini
ERROR [FTPControlSocket] 5 Aug 2008 06:23:28.453 : Exception in SendCommand : System.IO.IOException: 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.
System.IO.IOException: 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.
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadLine()
at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
CAUSED BY:
System.Net.Sockets.SocketException: 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
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
WARN [FTPClient] 5 Aug 2008 06:23:28.593 : SYST command failed - setting Unix as default parser : EnterpriseDT.Net.Ftp.FTPException: The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
EnterpriseDT.Net.Ftp.FTPException: The FTP client has not yet connected to the server. The requested action cannot be performed until after a connection has been established.
at EnterpriseDT.Net.Ftp.FTPClient.CheckConnection(Boolean shouldBeConnected)
at EnterpriseDT.Net.Ftp.FTPClient.GetSystem()
at EnterpriseDT.Net.Ftp.FTPClient.DirDetails(String dirname)
DEBUG [FTPFileFactory] 5 Aug 2008 06:23:28.593 : Selected UNIX parser
Between each failure he also ran the test code without errors. Equivalent Extract from log file attached:
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.453 : ---> SIZE ./htdocs/fymfiles_2/FYMYMNames.ini
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.656 : 213 4663
DEBUG [FTPConnection] 5 Aug 2008 06:25:32.656 : Combining absolute path 'C:\Keim\tmmp\FYM' with relative path 'C:\Keim\tmmp\FYM\server2\FYMYMNames.ini'
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.656 : ---> PASV
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.859 : 227 Entering Passive Mode (213,171,193,5,219,2)
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.859 : Server supplied address=213.171.193.5
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.859 : Server supplied port=56066
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.859 : Substituting server supplied IP (213.171.193.5) with remote host IP (213.171.193.5)
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:32.859 : NewPassiveDataSocket(213.171.193.5,56066)
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:33.062 : ---> RETR ./htdocs/fymfiles_2/FYMYMNames.ini
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:33.281 : 150-Accepted data connection
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:33.281 : 150 4.6 kbytes to download
DEBUG [FTPClient] 5 Aug 2008 06:25:33.281 : Transferred 4663 bytes from remote host
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:33.687 : 226-File successfully transferred
DEBUG [FTPControlSocket] 5 Aug 2008 06:25:33.687 : 226 0.000 seconds (measured here), 158.22 Mbytes per second
Any Help or suggestions on how to improve this situation would be gratefully received.
thanks,
Jim