An existing connection was forcibly closed by the remote hos - WeOnlyDo Discussion board

An existing connection was forcibly closed by the remote hos (wodFtpDLX / wodFtpDLX.NET)

by Tau, Friday, August 28, 2015, 15:47 (3161 days ago)

Hello

We are using FtpDLX.NET 1.8.0.231 and we've started to get errors during the transmission of a big file (50Mb). The target server would accept about 50% of the file, then drop connection with this error:

An existing connection was forcibly closed by the remote host


We tested file upload with Filezilla and it works correctly (uploads 100%). I assume it could be an encryption/cipher issue with FtpDLX.NET.

The remote SFTP server uses the following encryption settings:


09:55:15 Trace: We claim version: SSH-2.0
09:55:15 Trace: Server version: SSH-2.0
09:55:15 Trace: Using SSH protocol version 2
09:55:15 Trace: Doing ECDH key exchange with curve nistp256 and hash SHA-256
09:55:15 Trace: Host key fingerprint is:
09:55:15 Trace: ssh-rsa 2048 *****
09:55:15 Trace: Initialised AES-256 SDCTR client->server encryption
09:55:15 Trace: Initialised HMAC-SHA-256 client->server MAC algorithm
09:55:15 Trace: Initialised AES-256 SDCTR server->client encryption
09:55:15 Trace: Initialised HMAC-SHA-256 server->client MAC algorithm

Our C# initialization code is this:


Ftp1.Hostname = hostname;
Ftp1.Login = login;
Ftp1.Password = password;
Ftp1.Port = port;
Ftp1.Protocol = Protocols.SFTP;
Ftp1.Authentication = Authentications.Password;
Ftp1.Encryption = EncryptionMethods.Auto;
Ftp1.KeepAlive = 3;             

Ftp1.Blocking = true;
Ftp1.Timeout = 5000;

Ftp1.Passive = true;
Ftp1.Compression = 0;
Ftp1.TransferMode = TransferModes.Binary;

...
//We are sending file from a memory stream
byte[] contents = new byte[size];
using (MemoryStream ms = new MemoryStream(contents))
{
      ftp.PutFile(ms, "/incoming/test.csv");                            
}

Unfortunately, we cannot provide access to that server - it's one of our clients' and it's IP protected.

Any ideas about this issue? Does FtpDLX.NET support the above encryption/cipher?

Thank you!

An existing connection was forcibly closed by the remote hos

by Jasmine, Saturday, August 29, 2015, 15:42 (3160 days ago) @ Tau

Hi Tau.

It's virtually impossible to say why suddenly connection drops, without any specific explanation. I guess you should look at server-side logs to determine why it has decided to break the connection.

Does this happen with only one specific server, or with more than one?

Kind regards,
Jasmine.

An existing connection was forcibly closed by the remote hos

by Tau, Monday, August 31, 2015, 15:56 (3158 days ago) @ Jasmine

Hi Jasmine

Unfortunately, we cannot examine the server logs, we dont have the access. It happens with at least 2 servers they have.

Note, Filezilla and WinSCP FTP clients work fine with those servers.

My suspicion is that FtpDLX.NET may not support the encryption method used by those servers - I provided the encryption methods in the message above.

So, my request here is could you verify FtpDLX.NET works with the encryption methods mentioned above, and if not, could you please fix it. Thank you!

An existing connection was forcibly closed by the remote hos

by Jasmine, Monday, August 31, 2015, 16:07 (3158 days ago) @ Tau

Hi Tau.

I don't think it's related to choosing or not supporting encryption algorithm, since connection wouldn't be made in the first place, not after 50MB or so.

Something else is happening here. Do you know exactly what type of server is it? Perhaps we can install it locally for tests?

Jasmine.

An existing connection was forcibly closed by the remote hos

by Tau, Tuesday, September 01, 2015, 23:14 (3156 days ago) @ Jasmine
edited by Tau, Tuesday, September 01, 2015, 23:20

Hi Jasmine,

I think they use Oracle Linux (RHEL flavor), I assume it's v7.

If you want to provide me a debug build of FtpDLX with tracing enabled to a local file, I can run it against their server and it may give you some ideas.

An existing connection was forcibly closed by the remote hos

by Jasmine, Wednesday, September 02, 2015, 09:11 (3156 days ago) @ Tau

Hi Tau.

Local debugging will probably not say much, since connection just drops. From client's perspective, if all is running and suddenly connection is lost, I don't think we can manage to determine the reason.

In any case, we can create special version that will dump to local file current state of the component, so we can see on which packets it will drop.

Would you be so kind to send email to techsupport - at - weonlydo.com so we can attach debugging version there?

Kind regards,
Jasmine.

An existing connection was forcibly closed by the remote hos

by Tau, Monday, September 07, 2015, 16:43 (3151 days ago) @ Jasmine

Hi Jasmine

Excellent! I just sent an email to the Tech Support email you mentioned, the email has the same subject as this thread and some notes.

Thanks!