Page 1 of 1

Unable to upload file

Posted: Sun 11 Feb 2018 13:05
by Peter.Jonson
Version 8.1.2, using demo provided

When ReadBlockSize is 65536 and WriteBlockSize is 65536

11/02/2018 12:20:41 PM Cannot send data to server
11/02/2018 12:20:41 PM 11/02/2018 12:20:41 PM
11/02/2018 12:20:41 PM [0075F4D1] ScSFTPClient.TScSFTPClient.Transmit$qqrv (Line 1387, "ScSFTPClient.pas" + 9) + $E
11/02/2018 12:20:41 PM [00761234] ScSFTPClient.TScSFTPClient.InternalWriteFile$qqrp28Scsftpclient.TScSFTPFileItemp30Scsftpclient.TScSFTPBufferInfo (Line 2021, "ScSFTPClient.pas" + 19) + $3
11/02/2018 12:20:41 PM [007610E0] ScSFTPClient.TScSFTPClient.WriteFile$qqrx24System.%DynamicArray$uc%jt1iio (Line 1991, "ScSFTPClient.pas" + 35) + $9
11/02/2018 12:20:41 PM [007601C8] ScSFTPClient.TScSFTPClient.InternalUpload$qqrx24System.%DynamicArray$uc%p35Scsftpclient.TScSFTPLoadingFileInfo35Scsftpclient.TSFTPInternalOperation (Line 1643, "ScSFTPClient.pas" + 15) + $22
11/02/2018 12:20:42 PM [0075FF77] ScSFTPClient.TScSFTPClient.OpenAndUploadFile$qqrp22System.Classes.TStreamx20System.UnicodeStringt2o (Line 1617, "ScSFTPClient.pas" + 40) + $11
11/02/2018 12:20:42 PM [0040A041] System.@UStrFromPWCharLen$qqrr20System.UnicodeStringpbi + $25
11/02/2018 12:20:42 PM [0075FD02] ScSFTPClient.TScSFTPClient.UploadFile$qqrx20System.UnicodeStringt1o (Line 1560, "ScSFTPClient.pas" + 4) + $10
11/02/2018 12:20:42 PM [007678AE] SFTPClientFrame.TSFTPClientFrame.btUploadClick$qqrp14System.TObject (Line 625, "SFTPClientFrame.pas" + 5) + $58

When i increase ReadBlockSize to 131072 and WriteBlockSize is 131072

I get different message.

11/02/2018 12:32:20 PM Connection is not defined
11/02/2018 12:32:20 PM 11/02/2018 12:32:20 PM
11/02/2018 12:32:20 PM [0070ACEC] ScSSH2Channel.TSsh2Channel.TransmitPacket$qqrp30Screaderwriter.TSSH2DataStream (Line 385, "ScSSH2Channel.pas" + 6) + $E
11/02/2018 12:32:20 PM [0070A267] ScSSH2Channel.TSsh2Channel.Transmit$qqrpxcii (Line 130, "ScSSH2Channel.pas" + 19) + $9
11/02/2018 12:32:20 PM [0074631E] ScSSHChannel.TScSSHCustomChannel.DirectWrite$qqrpxcii (Line 723, "ScSSHChannel.pas" + 14) + $15
11/02/2018 12:32:20 PM [00746506] ScSSHChannel.TScSSHCustomChannel.InternalWriteBuffer$qqrpxcxixi (Line 772, "ScSSHChannel.pas" + 11) + $D
11/02/2018 12:32:20 PM [00746618] ScSSHChannel.TScSSHCustomChannel.WriteBuffer$qqrx24System.%DynamicArray$uc%xixi (Line 803, "ScSSHChannel.pas" + 1) + $D
11/02/2018 12:32:20 PM [0075F480] ScSFTPClient.TScSFTPClient.Transmit$qqrv (Line 1380, "ScSFTPClient.pas" + 2) + $25
11/02/2018 12:32:20 PM [00761234] ScSFTPClient.TScSFTPClient.InternalWriteFile$qqrp28Scsftpclient.TScSFTPFileItemp30Scsftpclient.TScSFTPBufferInfo (Line 2021, "ScSFTPClient.pas" + 19) + $3
11/02/2018 12:32:20 PM [007610E0] ScSFTPClient.TScSFTPClient.WriteFile$qqrx24System.%DynamicArray$uc%jt1iio (Line 1991, "ScSFTPClient.pas" + 35) + $9
11/02/2018 12:32:20 PM [007601C8] ScSFTPClient.TScSFTPClient.InternalUpload$qqrx24System.%DynamicArray$uc%p35Scsftpclient.TScSFTPLoadingFileInfo35Scsftpclient.TSFTPInternalOperation (Line 1643, "ScSFTPClient.pas" + 15) + $22
11/02/2018 12:32:20 PM [0075FF77] ScSFTPClient.TScSFTPClient.OpenAndUploadFile$qqrp22System.Classes.TStreamx20System.UnicodeStringt2o (Line 1617, "ScSFTPClient.pas" + 40) + $11
11/02/2018 12:32:20 PM [0040A041] System.@UStrFromPWCharLen$qqrr20System.UnicodeStringpbi + $25
11/02/2018 12:32:20 PM [0075FD02] ScSFTPClient.TScSFTPClient.UploadFile$qqrx20System.UnicodeStringt1o (Line 1560, "ScSFTPClient.pas" + 4) + $10
11/02/2018 12:32:20 PM [007678BE] SFTPClientFrame.TSFTPClientFrame.btUploadClick$qqrp14System.TObject (Line 625, "SFTPClientFrame.pas" + 5) + $58
11/02/2018 12:32:20 PM [0053BF37] Vcl.Controls.TControl.Click$qqrv + $73

Version 7.2.3 works absolutely fine

Filezilla works fine
Here is debug log from filezilla
Trace: Connecting to xxxxxxxx port 22
Trace: We claim version: SSH-2.0-FileZilla_3.30.0
Trace: Server version: SSH-2.0-1.82_sshlib
Trace: Using SSH protocol version 2
Trace: Doing Diffie-Hellman group exchange
Trace: Doing Diffie-Hellman key exchange with hash SHA-1
Trace: Host key fingerprint is:
Trace: ssh-rsa 2048 xxxxxxxxxxxxxxxxxxxxxx
Trace: Initialised AES-256 SDCTR client->server encryption
Trace: Initialised HMAC-SHA-256 client->server MAC algorithm
Trace: Initialised AES-256 SDCTR server->client encryption
Trace: Initialised HMAC-SHA-256 server->client MAC algorithm
Trace: Attempting keyboard-interactive authentication
Trace: Using keyboard-interactive authentication. inst_len: 0, num_prompts: 1
Command: Pass: ********
Trace: Access granted
Trace: Opening session as main channel
Trace: Opened main channel
Trace: Started a shell/command

Looking forward to the problem resolution ,so our customers

Re: Unable to upload file

Posted: Mon 12 Feb 2018 12:24
by ViktorV
The errors you specify do not depend on the values of the ReadBlockSize and the WriteBlockSize properties. The "Can not send data to server" error may occur, for example, when a connection to the server has failed, and the "Connection is not defined" error may occur if the ScSFTPClient component is not set the connection. Please let us know if you experience any issues when using the default values ​​for the ReadBlockSize and and WriteBlockSize properties.

Re: Unable to upload file

Posted: Mon 12 Feb 2018 19:11
by Peter.Jonson
I am using the demo which devart provided.

ScSFTPClient component does not have the Connection property.

It does not have "Connection" property it does have "SSHClient" property

Please let us know if you experience any issues when using the default values ​​for the ReadBlockSize and and WriteBlockSize properties.

Please have a look at the second line of my post, I am using default settings from you own demo and it does not work

Re: Unable to upload file

Posted: Tue 13 Feb 2018 09:36
by ViktorV
Please set the TScSSHClient.Options.SocketReceiveBufferSize and TScSSHClient.Options.SocketSendBufferSize properties to 8192 and check whether the problem will be reproduced.

Re: Unable to upload file

Posted: Tue 13 Feb 2018 19:38
by Peter.Jonson
Still does not work

13/02/2018 7:35:39 PM Connection is not defined
13/02/2018 7:35:39 PM 13/02/2018 7:35:39 PM
13/02/2018 7:35:39 PM [0070ACEC] ScSSH2Channel.TSsh2Channel.TransmitPacket$qqrp30Screaderwriter.TSSH2DataStream (Line 385, "ScSSH2Channel.pas" + 6) + $E
13/02/2018 7:35:39 PM [0070A267] ScSSH2Channel.TSsh2Channel.Transmit$qqrpxcii (Line 130, "ScSSH2Channel.pas" + 19) + $9
13/02/2018 7:35:39 PM [0074631E] ScSSHChannel.TScSSHCustomChannel.DirectWrite$qqrpxcii (Line 723, "ScSSHChannel.pas" + 14) + $15
13/02/2018 7:35:39 PM [00746506] ScSSHChannel.TScSSHCustomChannel.InternalWriteBuffer$qqrpxcxixi (Line 772, "ScSSHChannel.pas" + 11) + $D
13/02/2018 7:35:39 PM [00746618] ScSSHChannel.TScSSHCustomChannel.WriteBuffer$qqrx24System.%DynamicArray$uc%xixi (Line 803, "ScSSHChannel.pas" + 1) + $D
13/02/2018 7:35:39 PM [0075F480] ScSFTPClient.TScSFTPClient.Transmit$qqrv (Line 1380, "ScSFTPClient.pas" + 2) + $25
13/02/2018 7:35:39 PM [00761234] ScSFTPClient.TScSFTPClient.InternalWriteFile$qqrp28Scsftpclient.TScSFTPFileItemp30Scsftpclient.TScSFTPBufferInfo (Line 2021, "ScSFTPClient.pas" + 19) + $3
13/02/2018 7:35:39 PM [007610E0] ScSFTPClient.TScSFTPClient.WriteFile$qqrx24System.%DynamicArray$uc%jt1iio (Line 1991, "ScSFTPClient.pas" + 35) + $9
13/02/2018 7:35:39 PM [007601C8] ScSFTPClient.TScSFTPClient.InternalUpload$qqrx24System.%DynamicArray$uc%p35Scsftpclient.TScSFTPLoadingFileInfo35Scsftpclient.TSFTPInternalOperation (Line 1643, "ScSFTPClient.pas" + 15) + $22
13/02/2018 7:35:39 PM [0075FF77] ScSFTPClient.TScSFTPClient.OpenAndUploadFile$qqrp22System.Classes.TStreamx20System.UnicodeStringt2o (Line 1617, "ScSFTPClient.pas" + 40) + $11
13/02/2018 7:35:39 PM [0040A041] System.@UStrFromPWCharLen$qqrr20System.UnicodeStringpbi + $25
13/02/2018 7:35:39 PM [0075FD02] ScSFTPClient.TScSFTPClient.UploadFile$qqrx20System.UnicodeStringt1o (Line 1560, "ScSFTPClient.pas" + 4) + $10
13/02/2018 7:35:39 PM [007678BE] SFTPClientFrame.TSFTPClientFrame.btUploadClick$qqrp14System.TObject (Line 625, "SFTPClientFrame.pas" + 5) + $58

Re: Unable to upload file

Posted: Wed 14 Feb 2018 11:02
by ViktorV
Please specify the exact version of Delphi that you are using.

Re: Unable to upload file

Posted: Wed 14 Feb 2018 12:13
by Peter.Jonson
We use Delphi XE7

Re: Unable to upload file

Posted: Wed 14 Feb 2018 14:48
by ViktorV
We have not faced this issue before, you are the first user to contact us with a similar question.
We compiled our SFTPClient demo project using SecureBridge 8.1.2 on Delphi XE7 - https://devart.com/pub/dac/SFTPClient.exe. Please try connecting to your SFTP server using the compiled SFTPClient demo project and let us know about the result.

Re: Unable to upload file

Posted: Wed 14 Feb 2018 15:13
by Peter.Jonson
Still does not work
I am getting "Cannot send data to server"

Re: Unable to upload file

Posted: Fri 16 Feb 2018 10:39
by ViktorV
To investigate the issue, please provide us with test access to your SSH server and send it to us via e-support form: https://www.devart.com/company/contactform.html