EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SFTP - connection lost error

Posted: 09/08/2009 17:39:09
by Kel Koenig II (Standard support level)
Joined: 07/25/2008
Posts: 41

We're running into the following error and looking for more information as far as what's going wrong, Connection Lost (error code is 0)?

[9/8/2009 5:52 PM] EldoS SFTP Adapter: Loading private key
[9/8/2009 5:52 PM] EldoS SFTP Adapter: Loading trusted keys
[9/8/2009 5:52 PM] EldoS SFTP Adapter: 1 keys have been successfully loaded
[9/8/2009 5:52 PM] EldoS SFTP Adapter: Opening connection to SFTP server
[9/8/2009 5:52 PM] EldoS SFTP Adapter: Failed to transfer file(s): Connection lost (error code is 0)

at SBSimpleSftp.TElSimpleSFTPClient.DoReceive(Object Sender, Byte[]& Buffer, Int32 MaxSize, Int32& Written)
at SBSSHCommon.TElSSHClass.DoReceive(Byte[]& Buffer, Int32 MaxSize, Int32& Written)
at SBSSHClient.TElSSHClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.DataAvailable()
at SBSimpleSftp.TElSimpleSFTPClient.IntMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.DoMessageLoop()
at SBSimpleSftp.TElSimpleSFTPClient.Open()
at BizCrypto.BizTalk.Adapters.SFTP.SFTPCommon.DoSFTPOperation(IBaseMessage message, AdapterProperties props, Boolean upload, ArrayList fileList)
[9/8/2009 5:52 PM] EldoS SFTP Adapter (send): Error: Connection lost (error code is 0)
[9/8/2009 5:52 PM] EldoS SFTP Adapter (send): __ctor()
[9/8/2009 5:52 PM] EldoS SFTP Adapter (send): TransmitMessage()
[9/8/2009 5:52 PM] EldoS SFTP Adapter (send): CreateProperties()
[9/8/2009 5:52 PM] AdapterProperties::UpdateUriForDynamicSend() Uri: bc-sftp://cmg@ftp.statenational.com:22/Production/Loan_Intake/%SourceFileName%
[9/8/2009 5:52 PM] EldoS SFTP Adapter (send): ProcessMessage()
[9/8/2009 5:52 PM] AdapterProperties::LoadFromMessage()
Posted: 09/09/2009 00:32:26
by Ken Ivanov (Team)

Thank you for contacting us.

The error reports that the server has closed a socket connection gracefully. Some (mostly older) servers use to act in such way if they encounter some unrecognizable data (such as unsupported encryption algorithms) in messages received from client.

First of all, please try to set Compatibility Mode property to Old and check if it changes something.
Posted: 09/09/2009 07:24:42
by Kel Koenig II (Standard support level)
Joined: 07/25/2008
Posts: 41

Could it also indicate that either a bad password is being sent or the account is locked out? And is there any place that describes what these error codes indicate that I could look to first before posting?

Posted: 09/09/2009 10:10:41
by Ken Ivanov (Team)

No, authentication failures are reported separately. SSH/SFTP negotiation flows in the following way:

1. Security algorithms negotiation. The sets of algorithms supported by client and server are intersected to obtain the algorithms supported by both parties.

2. Server authentication.

This step is represented in the log with the following lines:

- Running key validation handler,
- Server key was found in the local trusted keys database / All keys are trusted, exiting.

3. Client authentication.

Client authenticates himself with the chosen method, sending the following lines to the log:

- Authentication type XXX failed,
- Authentication succeeded.

4. Subsystem setup.

This step, if goes successfully, is not represented in the log.

SSH protocol errors (corrupted data, bad key, unsupported cipher and so on) are reported via individual log messages. Socket read/write errors are reported via the "Connection lost (error code is XXX)" message.

As the log you provided reports the error on the very start of the negotiation (server authentication messages are not present in the log), and the reported socket error is 0 (meaning no error), I come to conclusion that the server closes the connection gracefully right after receiving initial packet from client.

Did setting Compatibility Mode to Old help?
Posted: 09/09/2009 10:17:00
by Kel Koenig II (Standard support level)
Joined: 07/25/2008
Posts: 41

I didn't try setting Mode to Old, it was a combination of initially having the incorrect password in the SFTP send port and this caused the SFTP account to get locked out. Once the account was unlocked and the correct password entered, everything was working.

Posted: 09/09/2009 10:58:22
by Ken Ivanov (Team)

Great, thank you for letting us know.

Then the account is likely to have been blocked on IP basis -- with simple password rejection you would at least get the server authentication-related entries in the log.



Topic viewed 8606 times

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


Back to top

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

Got it!