EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP adapter hangs

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#21604
Posted: 09/18/2012 18:48:11
by Brett Lyons (Basic support level)
Joined: 09/18/2012
Posts: 1

We are evaluating the SFTP adapter and cannot get it to work with our client's system. The symptom is that the adapter just stops working with after running for a while and requires host instance restart. Currently running with settings as per KB FAQ http://www.eldos.com/security/articles/6478.php except that I set the server key because I thought it was working and needed to verify the key auth worked. The log looks like this:

[9/14/2012 07:59:27.320] EldoS SFTP Adapter (receive): Start()
[9/14/2012 07:59:27.351] Searching for installed BizCrypto addons.
[9/14/2012 07:59:27.367] No addons found (the exact message: BizCrypto.BizTalk.Addons. Could not load file or assembly 'BizCrypto.BizTalk.Addons, Version=9.1.216.0, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a' or one of its dependencies. The system cannot find the file specified.)
[9/14/2012 07:59:27.398] Searching for installed BizCrypto addons.
[9/14/2012 07:59:27.398] No addons found (the exact message: BizCrypto.BizTalk.Addons. Could not load file or assembly 'BizCrypto.BizTalk.Addons, Version=9.1.216.0, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a' or one of its dependencies. The system cannot find the file specified.)
[9/14/2012 07:59:27.398] EldoS SFTP Adapter: Loading private key
[9/14/2012 07:59:27.398] EldoS SFTP Adapter: Loading trusted keys
[9/14/2012 07:59:27.398] EldoS SFTP Adapter: 1 keys have been successfully loaded
[9/14/2012 07:59:27.414] EldoS SFTP Adapter: Opening connection to SFTP server
[9/14/2012 07:59:29.617] EldoS SFTP Adapter: Running key validation handler
[9/14/2012 07:59:29.617] EldoS SFTP Adapter: Server key was found in the local trusted keys database
[9/14/2012 07:59:31.554] EldoS SFTP Adapter: Authentication succeeded
[9/14/2012 07:59:32.678] EldoS SFTP Adapter: Server introduced himself as SFTP Server
[9/14/2012 07:59:32.678] EldoS SFTP Adapter: SFTP connection started
[9/14/2012 07:59:32.678] EldoS SFTP Adapter: Downloading files...
[9/14/2012 07:59:34.491] EldoS SFTP Adapter: Obtained file list for /OUT/ and mask *.* (2 items):
[9/14/2012 07:59:34.491] EldoS SFTP Adapter: - CW_CUSDEC_20120913_235919_1188.txt (f)
[9/14/2012 07:59:34.491] EldoS SFTP Adapter: - CW_CUSDEC_20120913_235920_1189.txt (f)
[9/14/2012 07:59:34.491] EldoS SFTP Adapter: Downloading file CW_CUSDEC_20120913_235919_1188.txt from /OUT/CW_CUSDEC_20120913_235919_1188.txt
[9/14/2012 07:59:36.318] EldoS SFTP Adapter: Optionally deleting remote files according to adapter settings
[9/14/2012 07:59:36.318] EldoS SFTP Adapter: deleting /OUT/CW_CUSDEC_20120913_235919_1188.txt
[9/14/2012 07:59:36.803] EldoS SFTP Adapter: file deleted
[9/14/2012 07:59:36.803] EldoS SFTP Adapter: Download done
[9/14/2012 07:59:36.803] EldoS SFTP Adapter: Downloading file CW_CUSDEC_20120913_235920_1189.txt from /OUT/CW_CUSDEC_20120913_235920_1189.txt
[9/14/2012 07:59:38.599] EldoS SFTP Adapter: Optionally deleting remote files according to adapter settings
[9/14/2012 07:59:38.599] EldoS SFTP Adapter: deleting /OUT/CW_CUSDEC_20120913_235920_1189.txt
[9/14/2012 07:59:39.084] EldoS SFTP Adapter: file deleted
[9/14/2012 07:59:39.099] EldoS SFTP Adapter: Download done
[9/14/2012 07:59:39.099] EldoS SFTP Adapter: Download done, 2 files processed
[9/14/2012 07:59:39.099] EldoS SFTP Adapter: Closing the connection
[9/14/2012 07:59:39.099] EldoS SFTP Adapter (receive): PickupFilesAndSubmit() downloaded 2 file(s).
[9/14/2012 07:59:39.099] EldoS SFTP Adapter (receive): CreateMessage()
[9/14/2012 07:59:39.099] EldoS SFTP Adapter (receive): PickupFilesAndSubmit(): message created! PartContentType: , PartCharset:
[9/14/2012 07:59:39.099] EldoS SFTP Adapter (receive): CreateMessage()
[9/14/2012 07:59:39.099] EldoS SFTP Adapter (receive): PickupFilesAndSubmit(): message created! PartContentType: , PartCharset:
[9/14/2012 07:59:39.115] EldoS SFTP Adapter (receive): PickupFilesAndSubmit(): Submitting 2 file(s).
[9/14/2012 07:59:39.115] EldoS SFTP Adapter (receive): SubmitFiles(): Submitting a batch of 2 file(s).
[9/14/2012 07:59:42.958] SFTPReceiverEndpoint::BatchInfo::OnBatchComplete() overallStatus = True
[9/14/2012 07:59:42.958] SFTPReceiverEndpoint::BatchInfo::OnBatchComplete() Closing temporary stream
[9/14/2012 07:59:42.958] SFTPReceiverEndpoint::BatchInfo::OnBatchComplete() Deleting local file: CW_CUSDEC_20120913_235919_1188.txt
[9/14/2012 07:59:42.958] SFTPReceiverEndpoint::BatchInfo::OnBatchComplete() Closing temporary stream
[9/14/2012 07:59:42.958] SFTPReceiverEndpoint::BatchInfo::OnBatchComplete() Deleting local file: CW_CUSDEC_20120913_235920_1189.txt
...
... runs fine and continues to download files
...
[9/18/2012 02:24:03.615] Searching for installed BizCrypto addons.
[9/18/2012 02:24:03.615] No addons found (the exact message: BizCrypto.BizTalk.Addons. Could not load file or assembly 'BizCrypto.BizTalk.Addons, Version=9.1.216.0, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a' or one of its dependencies. The system cannot find the file specified.)
[9/18/2012 02:24:03.615] EldoS SFTP Adapter: Loading private key
[9/18/2012 02:24:03.615] EldoS SFTP Adapter: Loading trusted keys
[9/18/2012 02:24:03.630] EldoS SFTP Adapter: 1 keys have been successfully loaded
[9/18/2012 02:24:03.630] EldoS SFTP Adapter: Opening connection to SFTP server
[9/18/2012 02:24:05.958] EldoS SFTP Adapter: Running key validation handler
[9/18/2012 02:24:05.958] EldoS SFTP Adapter: Server key was found in the local trusted keys database
...
... this is where it was hung until the host instance was restarted
...
[9/18/2012 16:29:11.446] Searching for installed BizCrypto addons.
[9/18/2012 16:29:11.461] No addons found (the exact message: BizCrypto.BizTalk.Addons. Could not load file or assembly 'BizCrypto.BizTalk.Addons, Version=9.1.216.0, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a' or one of its dependencies. The system cannot find the file specified.)
[9/18/2012 16:29:11.477] Searching for installed BizCrypto addons.
[9/18/2012 16:29:11.493] No addons found (the exact message: BizCrypto.BizTalk.Addons. Could not load file or assembly 'BizCrypto.BizTalk.Addons, Version=9.1.216.0, Culture=neutral, PublicKeyToken=5a62fa96d0ac431a' or one of its dependencies. The system cannot find the file specified.)
[9/18/2012 16:29:11.493] EldoS SFTP Adapter: Loading private key
[9/18/2012 16:29:11.508] EldoS SFTP Adapter: Loading trusted keys
[9/18/2012 16:29:11.789] EldoS SFTP Adapter: 1 keys have been successfully loaded
[9/18/2012 16:29:11.805] EldoS SFTP Adapter: Opening connection to SFTP server
[9/18/2012 16:29:15.194] EldoS SFTP Adapter: Running key validation handler
[9/18/2012 16:29:15.194] EldoS SFTP Adapter: Server key was found in the local trusted keys database
[9/18/2012 16:29:17.100] EldoS SFTP Adapter: Authentication succeeded
[9/18/2012 16:29:18.209] EldoS SFTP Adapter: Server introduced himself as SFTP Server
[9/18/2012 16:29:18.209] EldoS SFTP Adapter: SFTP connection started
[9/18/2012 16:29:18.209] EldoS SFTP Adapter: Downloading files...
[9/18/2012 16:29:19.989] EldoS SFTP Adapter: Obtained file list for /OUT/ and mask *.* (125 items):
[9/18/2012 16:29:19.989] EldoS SFTP Adapter: - CW_CUSDEC_20120917_183928_1311.txt (f)
[9/18/2012 16:29:20.005] EldoS SFTP Adapter: - CW_CUSDEC_20120917_183928_1313.txt (f)
...
... and it downloaded the backlog without issue
...

I have had a similar issue when using the CodePlex bLogical SFTP adapter which is why I was evaluating yours as an alternative. It only seems to happen with our client's server which is running "IBM Sterling B2B Integrator" which gives the following info in WinSCP:

------------------------------------------------------------
Session protocol = SSH-2
SSH implementation = SFTP Server
Encryption algorithm = aes
Compression = No
File transfer protocol = SFTP-3
------------------------------------------------------------
Server host key fingerprint
ssh-rsa 1024 b7:7e:50:3c:f8:ee:d3:6c:7d:ed:a0:e0:b4:4f:f9:42
------------------------------------------------------------
Can change permissions = Yes
Can change owner/group = Yes
Can execute arbitrary command = No
Can create symlink/hardlink = Yes/No
Can lookup user groups = No
Can duplicate remote files = No
Can check available space = No
Can calculate file checksum = No
Native text (ASCII) mode transfers = No
------------------------------------------------------------
Additional information
The server does not support any SFTP extension.
------------------------------------------------------------

Attached image is the call stack from when I was able to replicate this in dev. I also have a dump file of the process if you need it.

Thanks for your assistance.


#21608
Posted: 09/19/2012 03:03:43
by Ken Ivanov (EldoS Corp.)

Brett,

Thank you for the really detailed report on the problem.

I guess the problem is caused by the server who suddenly stops sending data to the connection while keeping the connection itself alive. If my guess is correct, you will be able to overcome the issue by passing a non-zero timeout value to the adapter. Please try setting the Socket Timeout property to e.g. 20000 (20 seconds) and check if this setting brings in any changes to the adapter's behaviour. After setting the timeout the adapter would eventually report the connection as dead and try to collect the files on subsequent attempt.

If setting the timeout won't work for you, may I please ask you to send us the entire configuration of the adapter. You can do this privately via our secure Helpdesk system.

Reply

Statistics

Topic viewed 4144 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!