Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.3k views
in .NET FTP by (200 points)
Hi,

Sorry, probably not enough detail here but I am not quite sure what to post.

I am using the 4.2.0 release of edtFTPnet/PRO. During the download of a large file (700 odd MB) I got an error :

EnterpriseDT.Net.Ftp.Ssh.SFTPException: received packet inappropriate for current transport state [errorcode=2]
at EnterpriseDT.Net.Ftp.Ssh.SSHFTPClient.a(Stream A_0, String A_1, String A_2)
at EnterpriseDT.Net.Ftp.Ssh.SSHFTPClient.Get(String local, String remote)
at EnterpriseDT.Net.Ftp.FTPConnection.DownloadFile(String localPath, String remoteFile)
at FDPImport.FDPImport.LookForADRFiles()
at IFDSImport.main.Main(String[] args)

Is this something I can put defensive code in to force the component to retry the download from the last good packet recieved?

Any helps or tips would be fantastic.

Thanks

Stephen

5 Answers

0 votes
by (162k points)
Do you have any control over the server? Is it WinSSHD? I've seen a post that says this error can occur during key re-exchange.

If you are able to change server settings, and it is WinSSHD:

In WinSSHD Settings, under Session, uncheck the "Start key re-exchange" setting.

Otherwise can you email us a log file (see the help) set to Debug level with the start of the log file and a chunk around where the error occurs (please trim huge log files down and zip them up when emailing).
0 votes
by (200 points)
Hi,

I don't have control over the server unfortunately (and I am not sure what software they are using. Will try to find out) but will certainly try to produce a log of the error.

thanks

Stephen
0 votes
by (162k points)
Please email it to support@ .....

Thanks.
0 votes
by (200 points)
Email sent.

Thanks
0 votes
by (162k points)
Just to follow up for the forums, the problem turned out to be a bug in Globalscape 2.0-1.36, which is an old version (released in 2004). It tries to re-initalize the cryptographic keys used every 1 GB or 60 minutes during a transfer, and gets muddled if the transfer is continuing.

It is fixed in 2.0.5 which you can see in their version history (http://www.cuteftp.com/gsftps/history.aspx - see "Corrected inappropriate SFTP Banner Message ("unexpected packet #53") on server initiated key re-exchange").

We have verified that the problem does not exist in the latest version of the Globalscape server.

This problem can be worked around by catching the exception, reconnecting and resuming the transfer. We have also coded a work around. And of course upgrading Globalscape should fix the problem too.

Categories

...