I am using the Ftp and Sftp components of the rebex total pack, all works mostly fine but when I start transfering a lot of files (>5000) with putfile over a FTP SSL Connection the server closes the Connection after some time.
Regardless of wether I use one or two threads for the transfer or even if I use the GUI thread always the same exception is thrown after some time. I can continue the transfer if I close and reopen the connection with the same exception after some time.
Is it possible that there is some "keep alive" logic missing and if not how can I handle the exception without parsing the exception message string - the state of the Ftp Client when the exception occures is not "disconnected" but "reading".
Would that be the right handling for this kind of connection closing to check the Ftp client state for reading? Or is it possible to Monitor the TLS state?
with many thanks in advance,
Uwe
from the logfile:
2013-02-26 22:47:02.324 INFO Ftp(5)[10] Command: STOR testdatei.1469
2013-02-26 22:47:02.347 INFO Ftp(6)[11] Command: STOR testdatei.147
2013-02-26 22:47:02.361 INFO Ftp(5)[10] Response: 150 Opening BINARY mode data connection for testdatei.1469
2013-02-26 22:47:02.361 DEBUG Ftp(5)[10] Info: Upgrading data connection to TLS/SSL.
2013-02-26 22:47:02.362 DEBUG Ftp(5)[10] TLS: Data connection: Asking the server to resume session ID:
0000 |0D-37-C2-B6-E4-37-98-DF FF-9F-11-D6-C8-43-BE-2D| .7...7.......C.-
0010 |ED-86-51-FC-3D-F7-61-9A E4-43-AA-79-BF-62-F3-B9| ..Q.=.a..C.y.b..
2013-02-26 22:47:02.362 INFO Ftp(5)[10] TLS: Data connection: State StateChange:Negotiating
2013-02-26 22:47:02.362 DEBUG Ftp(5)[10] TLS: Data connection: HandshakeMessage:ClientHello was sent.
2013-02-26 22:47:02.382 INFO Ftp(6)[11] Response: 150 Opening BINARY mode data connection for testdatei.147
2013-02-26 22:47:02.383 DEBUG Ftp(6)[11] Info: Upgrading data connection to TLS/SSL.
2013-02-26 22:47:02.384 DEBUG Ftp(6)[11] TLS: Data connection: Asking the server to resume session ID:
0000 |08-59-CD-22-0D-06-57-97 43-7D-1E-80-98-01-73-68| .Y."..W.C}....sh
0010 |FA-5D-BF-8E-BE-A0-98-7B A0-E5-49-4C-08-E6-D7-C3| .].....{..IL....
2013-02-26 22:47:02.384 INFO Ftp(6)[11] TLS: Data connection: State StateChange:Negotiating
2013-02-26 22:47:02.384 DEBUG Ftp(6)[11] TLS: Data connection: HandshakeMessage:ClientHello was sent.
2013-02-26 22:47:02.399 DEBUG Ftp(5)[10] TLS: Data connection: HandshakeMessage:ServerHello was received.
2013-02-26 22:47:02.399 INFO Ftp(5)[10] TLS: Data connection: Info Info:ResumingCachedSession
2013-02-26 22:47:02.400 DEBUG Ftp(5)[10] TLS: Data connection: CipherSpec:ChangeCipherSpec was received.
2013-02-26 22:47:02.400 DEBUG Ftp(5)[10] TLS: Data connection: HandshakeMessage:Finished was received.
2013-02-26 22:47:02.400 DEBUG Ftp(5)[10] TLS: Data connection: CipherSpec:ChangeCipherSpec was sent.
2013-02-26 22:47:02.401 DEBUG Ftp(5)[10] TLS: Data connection: HandshakeMessage:Finished was sent.
2013-02-26 22:47:02.401 INFO Ftp(5)[10] TLS: Data connection: State StateChange:Secured
2013-02-26 22:47:02.401 INFO Ftp(5)[10] TLS: Data connection: Connection secured using cipher: TLS 1.0, RSA with ephemeral Diffie-Hellman, 128bit AES in CBC mode, SHA1
2013-02-26 22:47:02.401 DEBUG Ftp(5)[10] TLS: Data connection: Session ID:
0000 |0D-37-C2-B6-E4-37-98-DF FF-9F-11-D6-C8-43-BE-2D| .7...7.......C.-
0010 |ED-86-51-FC-3D-F7-61-9A E4-43-AA-79-BF-62-F3-B9| ..Q.=.a..C.y.b..
2013-02-26 22:47:02.401 DEBUG Ftp(5)[10] Info: Data connection upgraded to TLS/SSL.
2013-02-26 22:47:02.402 DEBUG Ftp(5)[10] Info: Closing uploading data connection.
2013-02-26 22:47:02.402 DEBUG Ftp(5)[10] TLS: Data connection: Closing TLS socket.
2013-02-26 22:47:02.402 INFO Ftp(5)[10] TLS: Data connection: Alert Alert:Alert was sent.
2013-02-26 22:47:02.402 INFO Ftp(5)[10] TLS: Data connection: State StateChange:Closed
2013-02-26 22:47:02.402 DEBUG Ftp(5)[10] Info: Waiting for data transfer ending message.
2013-02-26 22:47:02.420 DEBUG Ftp(6)[11] TLS: Data connection: HandshakeMessage:ServerHello was received.
2013-02-26 22:47:02.420 INFO Ftp(6)[11] TLS: Data connection: Info Info:ResumingCachedSession
2013-02-26 22:47:02.420 DEBUG Ftp(6)[11] TLS: Data connection: CipherSpec:ChangeCipherSpec was received.
2013-02-26 22:47:02.420 DEBUG Ftp(6)[11] TLS: Data connection: HandshakeMessage:Finished was received.
2013-02-26 22:47:02.421 DEBUG Ftp(6)[11] TLS: Data connection: CipherSpec:ChangeCipherSpec was sent.
2013-02-26 22:47:02.421 DEBUG Ftp(6)[11] TLS: Data connection: HandshakeMessage:Finished was sent.
2013-02-26 22:47:02.421 INFO Ftp(6)[11] TLS: Data connection: State StateChange:Secured
2013-02-26 22:47:02.421 INFO Ftp(6)[11] TLS: Data connection: Connection secured using cipher: TLS 1.0, RSA with ephemeral Diffie-Hellman, 128bit AES in CBC mode, SHA1
2013-02-26 22:47:02.421 DEBUG Ftp(6)[11] TLS: Data connection: Session ID:
0000 |08-59-CD-22-0D-06-57-97 43-7D-1E-80-98-01-73-68| .Y."..W.C}....sh
0010 |FA-5D-BF-8E-BE-A0-98-7B A0-E5-49-4C-08-E6-D7-C3| .].....{..IL....
2013-02-26 22:47:02.421 DEBUG Ftp(6)[11] Info: Data connection upgraded to TLS/SSL.
2013-02-26 22:47:02.422 DEBUG Ftp(6)[11] Info: Closing uploading data connection.
2013-02-26 22:47:02.422 DEBUG Ftp(6)[11] TLS: Data connection: Closing TLS socket.
2013-02-26 22:47:02.422 INFO Ftp(6)[11] TLS: Data connection: Alert Alert:Alert was sent.
2013-02-26 22:47:02.422 INFO Ftp(6)[11] TLS: Data connection: State StateChange:Closed
2013-02-26 22:47:02.422 DEBUG Ftp(6)[11] Info: Waiting for data transfer ending message.
2013-02-26 22:47:02.449 INFO Ftp(5)[10] Response: 226 Transfer complete
2013-02-26 22:47:02.449 DEBUG Ftp(5)[10] Info: Data transfer ended.
2013-02-26 22:47:02.449 DEBUG Ftp(5)[10] Info: Transfer ended successfully.
2013-02-26 22:47:02.449 DEBUG Ftp(5)[10] Info: Data connection closed.
2013-02-26 22:47:02.449 DEBUG Ftp(5)[10] Info: Starting data transfer.
2013-02-26 22:47:02.450 INFO Ftp(5)[10] Command: PASV
2013-02-26 22:47:02.473 INFO Ftp(6)[11] Response: 226 Transfer complete
2013-02-26 22:47:02.473 DEBUG Ftp(6)[11] Info: Data transfer ended.
2013-02-26 22:47:02.473 DEBUG Ftp(6)[11] Info: Transfer ended successfully.
2013-02-26 22:47:02.474 DEBUG Ftp(6)[11] Info: Data connection closed.
2013-02-26 22:47:02.474 DEBUG Ftp(6)[11] Info: Starting data transfer.
2013-02-26 22:47:02.474 INFO Ftp(6)[11] Command: PASV
2013-02-26 22:47:02.484 INFO Ftp(5)[10] Response: 227 Entering Passive Mode (80,237,132,78,195,175).
2013-02-26 22:47:02.485 DEBUG Ftp(5)[10] Info: Establishing data connection to 80.237.132.78:50095.
2013-02-26 22:47:02.564 INFO Ftp(5)[10] Command: STOR testdatei.1470
2013-02-26 22:47:02.564 DEBUG Ftp(6)[11] TLS: TLS socket error, 0 bytes of data were received.
2013-02-26 22:47:02.595 INFO Ftp(5)[10] Response: 150 Opening BINARY mode data connection for testdatei.1470
2013-02-26 22:47:02.596 DEBUG Ftp(5)[10] Info: Upgrading data connection to TLS/SSL.
2013-02-26 22:47:02.596 DEBUG Ftp(6)[11] TLS: TLS socket was closed: System.Net.Sockets.SocketException (0x80004005): Eine vorhandene Verbindung wurde vom Remotehost geschlossen
bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei Rebex.Net.ProxySocket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei gbMKS.1UaphuZ.1oSQZR(Int32 , Boolean )
bei gbMKS.1UaphuZ.JZ4YLZ()
bei gbMKS.1UaphuZ.1rsOcLZ()
2013-02-26 22:47:02.597 DEBUG Ftp(5)[10] TLS: Data connection: Asking the server to resume session ID:
0000 |0D-37-C2-B6-E4-37-98-DF FF-9F-11-D6-C8-43-BE-2D| .7...7.......C.-
0010 |ED-86-51-FC-3D-F7-61-9A E4-43-AA-79-BF-62-F3-B9| ..Q.=.a..C.y.b..
2013-02-26 22:47:02.597 INFO Ftp(5)[10] TLS: Data connection: State StateChange:Negotiating
2013-02-26 22:47:02.597 DEBUG Ftp(5)[10] TLS: Data connection: HandshakeMessage:ClientHello was sent.
2013-02-26 22:47:02.598 INFO Ftp(6)[11] TLS: Info Info:UnexpectedException
2013-02-