Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO

How does the timeout work?

0 votes
1,192 views
asked Nov 25, 2016 in .NET FTP by paco1983 (200 points)
Connection Type: FTPs

Sometimes when I try to connect to my FTP server this connection fails.

I donĀ“t understand the following.

I set the timeout in 30 seconds. But the exception occurs when the FTP server disconnects (60-second timeout in this case).

25 nov 2016 10:36:07.689 :  OS: 6.2.9200.0, CLR: 2.0.50727.8689, DLL: 9.0.0.20
25 nov 2016 10:36:07.689 :  Built: 2-Nov-2015 10:32:17 GMT
.
.
25 nov 2016 10:36:07.720 :  Set timeout=30000
.
.
25 nov 2016 10:36:07.736 :  Connecting to 10.10.1.136:990
25 nov 2016 10:36:07.736 :  waitOnShutdownSSL=True
25 nov 2016 10:36:07.752 :  ChangeSecurityProtocol: Tls1, Tls11, Tls12
25 nov 2016 10:36:07.752 :  Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=10.10.1.136, controlPort=990, timeout=30000
25 nov 2016 10:36:07.752 :  StrictReturnCodes=False
25 nov 2016 10:36:07.752 :  Resolving 10.10.1.136
25 nov 2016 10:36:07.752 :  10.10.1.136 resolved to 10.10.1.136
25 nov 2016 10:36:07.752 :  Connecting directly to ftp-server 10.10.1.136:990
25 nov 2016 10:36:07.752 :  Connecting to 10.10.1.136:990 with timeout 30000 ms
25 nov 2016 10:36:07.767 : FTPConnection.1 Local min SSL version: 3.1, max SSL version: 3.3
25 nov 2016 10:36:07.783 :  Successfully connected to 10.10.1.136:990
25 nov 2016 10:36:07.783 :  Beginning Tls1, Tls11, Tls12 handshake.
25 nov 2016 10:36:07.783 :  ChangeSecurityProtocol: Tls1, Tls11, Tls12
25 nov 2016 10:36:07.783 :  Tls1, Tls11, Tls12 handshake complete.
25 nov 2016 10:36:07.783 :  Setting socket timeout=30000
25 nov 2016 10:36:07.783 :  SetSocketTimeout: 30000
25 nov 2016 10:36:07.783 :  Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [SocketController] 25 nov 2016 10:36:07.798 : FTPConnection.1 Processing hello
DEBUG [CompatibilityLayer] 25 nov 2016 10:36:07.798 : FTPConnection.1 Remote SSL version: 3.1
ERROR [TransferBuffer] 25 nov 2016 10:36:37.790 :  TransferBuffer timeout (30000 ms)!
ERROR [SecureNetworkStream] 25 nov 2016 10:36:37.790 :  Socket.Receive() failed
ERROR [SecureNetworkStream] 25 nov 2016 10:36:37.790 :  System.IO.IOException: Timed out while reading data
ERROR [SecureNetworkStream] 25 nov 2016 10:36:37.790 :     en IDsZAqQoDbAMf8Q9tcJ.XLve6CQ3FTe0fUgqUMh.MTDLYi83s4(Byte[] , Int32 , Int32 )
ERROR [SecureNetworkStream] 25 nov 2016 10:36:37.790 :     en OLfCAvw8k5jUtKbRQIi.JnXKa2wBB0CFSVax5Jm.aTXFVWfQtg(IAsyncResult )
ERROR [SecureNetworkStream] 25 nov 2016 10:36:37.790 :     en DlT18RnnljelP9fdHZ5.i6RY6VnXnKsWxFgBmIh.EndReceive(IAsyncResult )
ERROR [SecureNetworkStream] 25 nov 2016 10:36:37.790 :     en DlT18RnnljelP9fdHZ5.i6RY6VnXnKsWxFgBmIh.Receive(Byte[] , Int32 , Int32 , SocketFlags )
ERROR [SecureNetworkStream] 25 nov 2016 10:36:37.790 :     en e4yig3nE4k8dRhjB5bc.ihIeAXn8iM9P5NsI7Qd.Read(Byte[] , Int32 , Int32 )
ERROR [FTPControlSocket] 25 nov 2016 10:36:37.790 :  Read failed ('' read so far)
DEBUG [FTPConnection] 25 nov 2016 10:36:37.790 :  Closing connection [instance=0,abrupt=False]
DEBUG [FTPFileFactory] 25 nov 2016 10:36:37.790 :  Defaulting to Unix parsing
DEBUG [FTPControlSocket] 25 nov 2016 10:36:37.790 :  ---> QUIT
DEBUG [AsyncResult] 25 nov 2016 10:36:38.009 :  WaitOne end: False 2
DEBUG [AsyncResult] 25 nov 2016 10:36:38.212 :  WaitOne end: False 2
.

.

.

.
DEBUG [AsyncResult] 25 nov 2016 10:37:07.737 :  WaitOne end: False 2
25 nov 2016 10:37:07.878 : FTPConnection.1 OnReceive closing (size == 0)
25 nov 2016 10:37:07.878 : FTPConnection.1 CloseConnection(e=null)
25 nov 2016 10:37:07.893 : FTPConnection.1 Closed socket
25 nov 2016 10:37:07.893 : FTPConnection.1 Close() called when open
ERROR [SocketController] 25 nov 2016 10:37:07.893 : FTPConnection.1 OnReceive - caught exception - closing: Socket closed before handshake is complete (2)
DEBUG [SocketController] 25 nov 2016 10:37:07.893 : FTPConnection.1 CloseConnection(e=Socket closed before handshake is complete (2))
DEBUG [SecureSocket] 25 nov 2016 10:37:07.893 : FTPConnection.1 OnHandshakeComplete(False,Socket closed before handshake is complete (2))
DEBUG [SecureSocket] 25 nov 2016 10:37:07.893 : FTPConnection.1 OnHandshakeComplete - in lock
DEBUG [SecureSocket] 25 nov 2016 10:37:07.893 : FTPConnection.1 OnHandshakeComplete - exiting lock
DEBUG [SecureSocket] 25 nov 2016 10:37:07.893 : FTPConnection.1 OnHandshakeComplete - exit
WARN [SecureNetworkStream] 25 nov 2016 10:37:07.893 :  Socket.Send() failed: An error occurred while communicating with the remote host.
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :  Exception in SendCommand
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :  System.IO.IOException: An I/O exception occurred.
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en e4yig3nE4k8dRhjB5bc.ihIeAXn8iM9P5NsI7Qd.Write(Byte[] , Int32 , Int32 )
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en System.IO.StreamWriter.Flush()
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en EnterpriseDT.Net.Ftp.FTPControlSocket.eDeM3UweIUx(String command)
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :  CAUSED BY - EnterpriseDT.Mentalis.Security.SecurityException: An I/O exception occurred.
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en DlT18RnnljelP9fdHZ5.i6RY6VnXnKsWxFgBmIh.MxFMRZA5HXp(IAsyncResult )
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en DlT18RnnljelP9fdHZ5.i6RY6VnXnKsWxFgBmIh.Send(Byte[] , Int32 , Int32 , SocketFlags )
ERROR [FTPControlSocket] 25 nov 2016 10:37:07.893 :     en e4yig3nE4k8dRhjB5bc.ihIeAXn8iM9P5NsI7Qd.Write(Byte[] , Int32 , Int32 )
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :  Command error
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :  System.IO.IOException: An I/O exception occurred.
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en e4yig3nE4k8dRhjB5bc.ihIeAXn8iM9P5NsI7Qd.Write(Byte[] , Int32 , Int32 )
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en System.IO.StreamWriter.Flush()
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en EnterpriseDT.Net.Ftp.FTPControlSocket.eDeM3UweIUx(String command)
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :  CAUSED BY - EnterpriseDT.Mentalis.Security.SecurityException: An I/O exception occurred.
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en DlT18RnnljelP9fdHZ5.i6RY6VnXnKsWxFgBmIh.MxFMRZA5HXp(IAsyncResult )
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en DlT18RnnljelP9fdHZ5.i6RY6VnXnKsWxFgBmIh.Send(Byte[] , Int32 , Int32 , SocketFlags )
ERROR [FTPConnection] 25 nov 2016 10:37:07.893 :     en e4yig3nE4k8dRhjB5bc.ihIeAXn8iM9P5NsI7Qd.Write(Byte[] , Int32 , Int32 )
DEBUG [FTPConnection] 25 nov 2016 10:37:07.893 :  Closing connection [instance=0,abrupt=True]
DEBUG [FTPFileFactory] 25 nov 2016 10:37:07.893 :  Defaulting to Unix parsing
DEBUG [SocketController] 25 nov 2016 10:37:07.893 :  Dispose()
DEBUG [SocketController] 25 nov 2016 10:37:07.893 :  CloseConnection(e=null)
INFO [FTPControlSocket] 25 nov 2016 10:37:07.893 :  Killed control socket
WARN [FTPConnection] 25 nov 2016 10:37:07.893 :  Caught exception closing connection: Referencia a objeto no establecida como instancia de un objeto.
DEBUG [FTPConnection] 25 nov 2016 10:37:07.909 :  Closing connection [instance=0,abrupt=False]
WARN [FTPConnection] 25 nov 2016 10:37:07.909 :  Caught exception closing connection: The FTP client has not yet connected to the server.  The requested action cannot be performed until after a connection has been established.

Please log in or register to answer this question.

...