EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Connection lost (error code is 10054)

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#31593
Posted: 12/05/2014 11:30:09
by Meghana Miraj (Standard support level)
Joined: 11/24/2014
Posts: 6

My program is unable to download large files (around 100 or more at a time) from a folder from our client's SFTP server and generates the below error message.

InnerException:
Message: Connection lost (error code is 10054)

It has been working fine for the last several years and has been failing since last week. I can download the files using FileZilla though.

The program connects but loses connection during file download. I tried these settings:
sftpClient.AutoAdjustTransferBlock = false;
sftpClient.PipelineLength = 1;
sftpClient.DownloadBlockSize = 32768;
sftpClient.set_CompressionAlgorithms(0, false);

But, it didn't help. I have looked through the articles and previous posts. Could it be the client's server? Your help is appreciated. Thanks.
#31594
Posted: 12/05/2014 12:04:43
by Eugene Mayevski (EldoS Corp.)

What version of SecureBlackbox are you using?


Sincerely yours
Eugene Mayevski
#31595
Posted: 12/05/2014 13:11:06
by Meghana Miraj (Standard support level)
Joined: 11/24/2014
Posts: 6

Version 12.0
#31597
Posted: 12/05/2014 13:22:37
by Eugene Mayevski (EldoS Corp.)

Ok...

If FileZilla works, then what you need to do is disable (in SecureBlackbox component) all algorithms in a loop, then enable those algorithms that FileZilla shows as the ones used to connect.

The following line: sftpClient.set_CompressionAlgorithms(0, false); disables "no compression" mode. I am not sure what it's intended to do (i.e. what you wanted it to do), so I can't say if it's correct. But usually "no compression" mode should be enabled for compatibility.

Next, your code sets DownloadBlockSize to 32 Kb. Try setting it to 16 Kb.


Sincerely yours
Eugene Mayevski
#31600
Posted: 12/05/2014 13:38:22
by Meghana Miraj (Standard support level)
Joined: 11/24/2014
Posts: 6

I can't see what algorithms FileZilla uses to connect. I tried disabling the algorithms one at a time and still see the issue. I tried reducing the download size too.

Also, this time there was only one file to download from this folder. The program can download files from other folders under the same directory from the client's server. The problem lies with just this one folder.
#31602
Posted: 12/05/2014 13:45:20
by Eugene Mayevski (EldoS Corp.)

If the problem is file-specific, then all your adjustments don't make sense - the issue is in the server closing connection most likely due to insufficient access rights or due to other similar error.


Sincerely yours
Eugene Mayevski
#31603
Posted: 12/05/2014 13:53:37
by Meghana Miraj (Standard support level)
Joined: 11/24/2014
Posts: 6

It is more folder specific. It can't download any files from this folder. But it can download from other folders at the same level under the directory. It can connect just fine but fails during download. So, are you saying the server is closing connection during download?
#31604
Posted: 12/05/2014 13:56:35
by Eugene Mayevski (EldoS Corp.)

I can only guess. It can be the name of the folder as well (if possible, try to rename the folder and see if this helps. Also if it's not a folder but a symlink or a hardlink, this *can* affect server behavior.


Sincerely yours
Eugene Mayevski
#31605
Posted: 12/05/2014 14:21:06
by Meghana Miraj (Standard support level)
Joined: 11/24/2014
Posts: 6

I can't rename the folder..it is on the Client's server. The same application has worked in the past and has been failing recently. Does this error code, 10054 point to a single reason or could it be multiple reasons?
#31607
Posted: 12/06/2014 01:30:55
by Eugene Mayevski (EldoS Corp.)

This is winsock error code which basically says "connection has been closed" and nothing more. Obviously it's a server's bug (which should not close connection but should report an error on SSH or even SFTP level if something goes wrong).

There's not much we can do without possibility to test the server *and* without being able to rename the folder and/or check permissions.

You need to contact administrators of the server to figure out what has been changed.


Sincerely yours
Eugene Mayevski
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.

Reply

Statistics

Topic viewed 1889 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!