0 votes
by (200 points)
edited

So i have an FTP site I am connecting to that requires an Active mode connection. It seems that the smallest of issues is causing the connection to be aborted. This is especially true when leaving the connection open for multiple operations. I have seen other similar posts but most were dealing with SFTP. Is there a known setting I need to resolve the following error:

An established connection was aborted by the software in your host machine.

I am upgrading this process to a C# windows service from a SSIS process. The SSIS process downloading does not seem to have issues. So, I wasn't sure if it was related to the library. Also, this does not happen every run, but it occurs a lot of the time. 50-75% of the time. Below is the logs, although does not appear to coming out in a pretty format. Thank you

 2013-06-20 14:14:03.305 DEBUG Ftp(1)[9] Info: Control connection failed, closing current data connection.
2013-06-20 14:14:03.519 DEBUG Ftp(1)[9] Info: Error while starting data transfer: Rebex.Net.FtpException: An established connection was aborted. ---> Rebex.Net.FtpException: An established connection was aborted. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at Rebex.Net.ProxySocket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at gbMKS.l7gsR.1IsOQMZ(Byte[] , Int32 )
   at gbMKS.l7gsR.1dH3Qs(String& , Int32 )
   at gbMKS.l7gsR.as4miZ(Int32 )
   at gbMKS.l7gsR.as4miZ()
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   at Rebex.Net.Ftp.1SAJuN(Int32 )
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )
2013-06-20 14:14:03.536 ERROR Ftp(1)[9] Info: Rebex.Net.FtpException: An established connection was aborted. ---> Rebex.Net.FtpException: An established connection was aborted. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at Rebex.Net.ProxySocket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at gbMKS.l7gsR.1IsOQMZ(Byte[] , Int32 )
   at gbMKS.l7gsR.1dH3Qs(String& , Int32 )
   at gbMKS.l7gsR.as4miZ(Int32 )
   at gbMKS.l7gsR.as4miZ()
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   at Rebex.Net.Ftp.1SAJuN(Int32 )
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , 27NpLhZ , Int64 , FtpTransferState )
   at Rebex.Net.Ftp.zo0DuZ(String , Boolean , Stream , Int64 , String , 27NpLhZ )
2013-06-20 14:14:03.551 ERROR Ftp(1)[9] Info: Rebex.Net.FtpException: An established connection was aborted. ---> Rebex.Net.FtpException: An established connection was aborted. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at Rebex.Net.ProxySocket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at gbMKS.l7gsR.1IsOQMZ(Byte[] , Int32 )
   at gbMKS.l7gsR.1dH3Qs(String& , Int32 )
   at gbMKS.l7gsR.as4miZ(Int32 )
   at gbMKS.l7gsR.as4miZ()
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   at Rebex.Net.Ftp.1SAJuN(Int32 )
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , 27NpLhZ , Int64 , FtpTransferState )
   at Rebex.Net.Ftp.zo0DuZ(String , Boolean , Stream , Int64 , String , 27NpLhZ )

I am not 100% on this, but I think it is only happening when calling GetList().

Applies to: Rebex FTP/SSL

3 Answers

0 votes
by (58.9k points)
edited

The immediate cause of the error is that the connection was aborted which resulted in the Rebex FTP to report this error (if the connection was open for a longer time, the server might have for instance closed it by itself, but this is only one possible cause).

From the partial log you uploaded here, however, we cannot say for sure what was the cause of the connection failure. Could you please send us complete log of the whole FTP session? You can send it to support@rebex.net or post it here.

We should be able to help you then.

0 votes
by (200 points)
edited

I can now confirm that it is not only the GetList() operation. GetFile is also erroring out. There is not much more to the logs. I am downloading multiple files in parallel, so it is a lot of downloads operations. Here is the new log portion for the GetFile() breaking:


2013-06-21 14:47:24.869 DEBUG Ftp(21)[24] Info: Error while starting data transfer: Rebex.Net.FtpException: An established connection was aborted. ---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
   at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at Rebex.Net.ProxySocket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
   at gbMKS.l7gsR.1IsOQMZ(Byte[] , Int32 )
   at gbMKS.l7gsR.1dH3Qs(String& , Int32 )
   at gbMKS.l7gsR.as4miZ(Int32 )
   at gbMKS.l7gsR.as4miZ()
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   --- End of inner exception stack trace ---
   at Rebex.Net.Ftp.1SAJuN(Int32 , Boolean )
   at Rebex.Net.Ftp.1SAJuN(Int32 )
   at Rebex.Net.Ftp.ykKHPZ(EndPoint )
   at Rebex.Net.Ftp.2aYAeNZ(String , Boolean , OTxlj , Int64 , String , String , Int64 , FtpTransferState )

by (58.9k points)
edited

As I wrote above, we cannot help you unless you send the log of the whole FTP session to support@rebex.net. Sorry! The stacktrace is clear but it gives us no additional info as to what interrupts your FTP connections.

0 votes
by (200 points)
edited

I am not seeing a way to post a file the forum, so I sent the log to the support email.

by (58.9k points)
edited

Thank you for the logfile, it landed in our inbox and we're looking into it.

...