How to resume upload on a large file using SFTP?

This forum is not monitored by the SmartFTP staff. If you have a license please contact technical support by email.
Post Reply
ds1
Posts: 15
Joined: Fri Feb 04, 2011 4:59 am

How to resume upload on a large file using SFTP?

Post by ds1 » Mon Apr 11, 2011 4:55 pm

I am using the SmartFTP Library Version 2.0.115.0. When I try to resume uploading of a file over SFTP protocol on a newly created connection it resumes the uploading properly. However when I abort current uploading of a file and again try to resume upload of the same file on same object it returns the error "enumError.ftpErrorWrongReply".
I tried to perform same operation using Smart FTP Client to resume uploading of file of size 47MB after aborting the transfer, it worked properly. However when the size of file is greater than 500MB it does not work and starts logging the below messages. The pause operation, on uploading file over SFTP is not working for any size of the file.


Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.
[18:40:51] Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.
[18:40:51] Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.
[18:40:51] Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.


Anybody have suggestions on how to
1. pause/resume the upload
2. how to resume uploading on a existing connection
3. how to resume uploading for large files

Appreciate the assistance.

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: How to resume upload on a large file using SFTP?

Post by mb » Mon Apr 11, 2011 4:56 pm

What is your license key id?

ds1
Posts: 15
Joined: Fri Feb 04, 2011 4:59 am

Re: How to resume upload on a large file using SFTP?

Post by ds1 » Tue Apr 12, 2011 2:50 am

400135631

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: How to resume upload on a large file using SFTP?

Post by mb » Tue Apr 12, 2011 11:35 am

Did you already try it with the SmartFTP Client?

ds1
Posts: 15
Joined: Fri Feb 04, 2011 4:59 am

Re: How to resume upload on a large file using SFTP?

Post by ds1 » Tue Apr 12, 2011 1:39 pm

I tried to perform same operation using Smart FTP Client to resume uploading of file of size 47MB after aborting the transfer, it worked properly. However when the size of file is greater than 500MB it does not work and starts logging the below messages. The pause operation, on uploading file over SFTP is not working for any size of the file.


Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.
[18:40:51] Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.
[18:40:51] Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.
[18:40:51] Getting attributes of "/fileToUpload.rar".
[18:40:51] Attributes successfully obtained.

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: How to resume upload on a large file using SFTP?

Post by mb » Tue Apr 12, 2011 2:15 pm

Most likely the server's SFTP implementation is broken. Please try to reproduce the problem with another SFTP client. If it works there please send us a test account to support at smartftp.com
Thank you.
Last edited by mb on Tue Apr 12, 2011 2:16 pm, edited 1 time in total.

ds1
Posts: 15
Joined: Fri Feb 04, 2011 4:59 am

Re: How to resume upload on a large file using SFTP?

Post by ds1 » Wed Apr 13, 2011 10:40 pm

The problem occurs on the following servers (so far);
Sysax Multi Server
Wing Server
Complete Ftp Server
Wise SFTP server

Are you saying these all have broken SFTP implementations? And only for large files - 100mbytes + ?

mb
Posts: 12029
Joined: Thu Oct 11, 2001 1:24 pm
Display name: Mat (SmartFTP)
Contact:

Re: How to resume upload on a large file using SFTP?

Post by mb » Wed Apr 13, 2011 11:40 pm

1. Installed latest verison of Wing FTP server
2. Noticed that it only supports SFTP protocol 3
3. Started upload of 3GB file
4. Aborted upload several times, restarted it
5. Resume was always working as you can see in the log below:

[01:35:01] Operation Begin
[01:35:01] Resolving host name "localhost"
[01:35:01] Connecting to 127.0.0.1 Port: 22
[01:35:01] SSH-2.0-WingFTPserver
[01:35:01] Starting SSH session. Remote Id: "SSH-2.0-WingFTPserver"
[01:35:01] SSH protocol version reply. Client Id: SSH-2.0-SmartFTP
[01:35:01] Key Exchange Algorithm: diffie-hellman-group-exchange-sha1
[01:35:01] Key exchange completed.
[01:35:01] Host Key Algorithm: ssh-rsa
[01:35:01] Client to Server Encryption: 3des-cbc
[01:35:01] Server to Client Encryption: 3des-cbc
[01:35:01] Session MAC: hmac-sha1
[01:35:01] Client to Server Compression: none
[01:35:01] Server to Client Compression: none
[01:35:01] Requesting service "ssh-userauth".
[01:35:01] RTT: 0.135 ms
[01:35:01] Authentication request. Method: none
[01:35:01] Server supported authentications: publickey,password
[01:35:01] Authentication request. Method: password
[01:35:01] User authentication successful.
[01:35:01] SSH session established.
[01:35:01] Connected to localhost.
[01:35:01] Opening channel 0.
[01:35:01] Channel successfully opened (Local=0, Remote=0).
[01:35:01] Requesting subystem "sftp" (Local=0, Remote=0).
[01:35:01] Sending FXP initialization. Protocol version=6.
[01:35:01] SFTP protocol version 3
[01:35:01] Resolving path "/icons".
[01:35:01] Path successfully resolved to "/icons".
[01:35:01] Remote file exist check: "bla.iso".
[01:35:01] Getting attributes of "/icons/bla.iso".
[01:35:01] Attributes successfully obtained.
[01:35:01] Source File: Size=3319478272, Date Modified=2011-04-13T05:14:40
[01:35:01] Destination File: Size=183336960, Date Modified=2011-04-13T23:34:33
[01:35:01] RecentTime=2011-04-13T23:34:13
[01:35:01] Rule "IF Destination Time=Recent AND Size=Smaller AND Transfer=No Matter THEN Resume" matched. Action="Resume".
[01:35:01] Uploading file to "/icons/bla.iso".
[01:35:01] StartPosition=183336960, EndPosition=0.
[01:37:22] 688848896 bytes transferred. (4.64 MB/s) (00:02:21)
[01:37:22] Transfer failed.
[01:37:22] Operation End
[01:37:40] Operation Begin
[01:37:40] Resolving host name "localhost"
[01:37:40] Connecting to 127.0.0.1 Port: 22
[01:37:40] SSH-2.0-WingFTPserver
[01:37:40] Starting SSH session. Remote Id: "SSH-2.0-WingFTPserver"
[01:37:40] SSH protocol version reply. Client Id: SSH-2.0-SmartFTP
[01:37:40] Key Exchange Algorithm: diffie-hellman-group-exchange-sha1
[01:37:40] Key exchange completed.
[01:37:40] Host Key Algorithm: ssh-rsa
[01:37:40] Client to Server Encryption: 3des-cbc
[01:37:40] Server to Client Encryption: 3des-cbc
[01:37:40] Session MAC: hmac-sha1
[01:37:40] Client to Server Compression: none
[01:37:40] Server to Client Compression: none
[01:37:40] Requesting service "ssh-userauth".
[01:37:40] RTT: 0.144 ms
[01:37:40] Authentication request. Method: none
[01:37:40] Server supported authentications: publickey,password
[01:37:40] Authentication request. Method: password
[01:37:40] User authentication successful.
[01:37:40] SSH session established.
[01:37:40] Connected to localhost.
[01:37:40] Opening channel 0.
[01:37:40] Channel successfully opened (Local=0, Remote=0).
[01:37:40] Requesting subystem "sftp" (Local=0, Remote=0).
[01:37:40] Sending FXP initialization. Protocol version=6.
[01:37:40] SFTP protocol version 3
[01:37:40] Resolving path "/icons".
[01:37:40] Path successfully resolved to "/icons".
[01:37:40] Remote file exist check: "bla.iso".
[01:37:40] Getting attributes of "/icons/bla.iso".
[01:37:40] Attributes successfully obtained.
[01:37:40] Source File: Size=3319478272, Date Modified=2011-04-13T05:14:40
[01:37:40] Destination File: Size=872185856, Date Modified=2011-04-13T23:37:23
[01:37:40] RecentTime=2011-04-13T23:37:22
[01:37:40] Rule "IF Destination Time=Recent AND Size=Smaller AND Transfer=No Matter THEN Resume" matched. Action="Resume".
[01:37:40] Uploading file to "/icons/bla.iso".
[01:37:40] StartPosition=872185856, EndPosition=0.
[01:37:47] 38567936 bytes transferred. (4.99 MB/s) (00:00:07)
[01:37:47] Transfer failed.
[01:37:47] Operation End
Last edited by mb on Wed Apr 13, 2011 11:41 pm, edited 1 time in total.

Post Reply