EldoS | Feel safer!

Software components for data protection, secure storage and transfer

'End of file' error on CloseHandle

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#32297
Posted: 02/20/2015 07:22:54
by Stefan G (Standard support level)
Joined: 01/13/2015
Posts: 4

Hello!

We are using SecureBlackbox 12 VCL.
We integrated your SFTP client into our software.
Generally it works fine, but we often get following
error in TElSftpClient.CloseHandle

EElSFTPError with
FLastSyncError = 1
FLastSyncComment = 'End of file'

After the error appears the first time we receive it always until
restarting the sftp client. When we debug the code, we see that
* the connection is not lost,
* the commands itself would work. (e.g. set server dir, list files)
#32298
Posted: 02/20/2015 07:27:53
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

If you have a license, please assign the license ticket to your user account before we continue. The ticket itself and the procedure of it's use are specified in the registration e-mail that was sent to you upon license purchase.
#32299
Posted: 02/20/2015 07:46:22
by Stefan G (Standard support level)
Joined: 01/13/2015
Posts: 4

Done
#32301
Posted: 02/20/2015 07:56:52
by Vsevolod Ievgiienko (EldoS Corp.)

Please check the article: https://www.eldos.com/documentation/sb...error.html

SSH_ERROR_EOF if not an error - it just indicates end-of-file condition.
#37755
Posted: 09/22/2016 04:04:52
by Stefan G (Standard support level)
Joined: 01/13/2015
Posts: 4

We get the error for some SFTP Server permanently.
This is a showstopper for us!

In procedure TElSftpClient.CloseHandleSync following error is raised:

if not CloseHandle(Handle) then
raise EElSFTPError.CreateCode(FLastSyncError, FLastSyncComment);

This is the callstack:
SBSftp.TElSftpClient.CloseHandleSync((104, 120, 52, 49))
SBSimpleSftp.TElSimpleSFTPClient.CloseHandle((104, 120, 52, 49))
SBIdSFTP.TElIdSFTPClient.List
SBIdSFTP.TElIdSFTPClient.List('',True)
SBIdSFTP.TElIdSFTPClient.List($127D7670,'',True)

After the exception, the connection is not usable anymore, as the same error is raised on every command, and only a restart helps.
#37757
Posted: 09/22/2016 04:37:29
by Ken Ivanov (EldoS Corp.)

Hi Stefan,

I believe the problem might take place due to a popular bug in some SFTP servers. Please try to insert a dummy call to RequestAbsolutePath() method straight after your Open() method returns and see if it helps to overcome the issue:

Code
client.Open();
client.RequestAbsolutePath('');

// your code
// ...


Ken
#37759
Posted: 09/22/2016 07:30:20
by Stefan G (Standard support level)
Joined: 01/13/2015
Posts: 4

Hy,

I tried this, but it did not help.
#37760
Posted: 09/22/2016 07:45:36
by Eugene Mayevski (EldoS Corp.)

SSH and SFTP is a running target -- the servers are updated all the time, new bugs are made, etc.. We also implement changes, needed to co-operate with those server-side changes, all the time.

So the first step to take is to try SecuerBlackbox 15 and see if it works right.

Also, please try TElSimpleSFTPClient component instead of Indy-based one.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

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