Thank you for a quick response, Lukas.
I just tried using the WinSCP and seeing a similar behavior when I just tried to upload a dummy file (see screenshot:
Below is a part of the log that I was able to obtain from the WinSCP
. 2012-10-12 07:52:43.389 Enter password for cpimod01, Password:)
. 2012-10-12 07:52:43.390 Using stored password.
. 2012-10-12 07:52:43.964 Access granted
. 2012-10-12 07:52:43.997 Opened channel for session
. 2012-10-12 07:52:44.226 Started a shell/command
. 2012-10-12 07:52:44.266 --------------------------------------------------------------------------
. 2012-10-12 07:52:44.266 Using SFTP protocol.
. 2012-10-12 07:52:44.267 Doing startup conversation with host.
> 2012-10-12 07:52:44.321 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2012-10-12 07:52:44.355 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2012-10-12 07:52:44.356 SFTP version 3 negotiated.
. 2012-10-12 07:52:44.356 We believe the server has signed timestamps bug
. 2012-10-12 07:52:44.356 We will use UTF-8 strings for status messages only
. 2012-10-12 07:52:44.375 Changing directory to "/home/cpimod01".
. 2012-10-12 07:52:44.375 Getting real path for '/home/cpimod01'
> 2012-10-12 07:52:44.375 Type: SSH_FXP_REALPATH, Size: 23, Number: 6416
< 2012-10-12 07:52:44.507 Type: SSH_FXP_NAME, Size: 69, Number: 6416
. 2012-10-12 07:52:44.507 Real path is '/home/cpimod01'
. 2012-10-12 07:52:44.507 Trying to open directory "/home/cpimod01".
> 2012-10-12 07:52:44.507 Type: SSH_FXP_LSTAT, Size: 23, Number: 6663
< 2012-10-12 07:52:44.567 Type: SSH_FXP_ATTRS, Size: 29, Number: 6663
. 2012-10-12 07:52:44.567 Getting current directory name.
. 2012-10-12 07:52:44.673 Listing directory "/home/cpimod01".
> 2012-10-12 07:52:44.673 Type: SSH_FXP_OPENDIR, Size: 23, Number: 6923
< 2012-10-12 07:52:44.746 Type: SSH_FXP_HANDLE, Size: 11, Number: 6923
> 2012-10-12 07:52:44.747 Type: SSH_FXP_READDIR, Size: 11, Number: 7180
< 2012-10-12 07:52:44.779 Type: SSH_FXP_STATUS, Size: 28, Number: 7180
< 2012-10-12 07:52:44.779 Status code: 1
. 2012-10-12 07:52:44.779 Listing file "/home/cpimod01/..".
> 2012-10-12 07:52:44.780 Type: SSH_FXP_LSTAT, Size: 26, Number: 7431
< 2012-10-12 07:52:44.812 Type: SSH_FXP_ATTRS, Size: 29, Number: 7431
> 2012-10-12 07:52:44.812 Type: SSH_FXP_CLOSE, Size: 11, Number: 7684
. 2012-10-12 07:52:44.872 Startup conversation with host finished.
. 2012-10-12 07:52:57.388 Copying 1 files/directories to remote directory "/home/cpimod01/"
. 2012-10-12 07:52:57.388 PrTime: Yes; PrRO: No; Rght: rw-r--r--; PrR: No (No); FnCs: N; RIC: 0100; Resume: S (102400); CalcS: Yes; Mask: *.*
. 2012-10-12 07:52:57.388 TM: B; ClAr: No; CPS: 0; InclM:
. 2012-10-12 07:52:57.388 AscM: *.*html; *.htm; *.txt; *.php; *.php3; *.cgi; *.c; *.cpp; *.h; *.pas; *.bas; *.tex; *.pl; *.js; .htaccess; *.xtml; *.css; *.cfg; *.ini; *.sh; *.xml
. 2012-10-12 07:52:57.388 File: "D:\Temp\FTPTest1.pgp"
. 2012-10-12 07:52:57.391 Copying "D:\Temp\FTPTest1.pgp" to remote directory started.
. 2012-10-12 07:52:57.391 Binary transfer mode selected.
. 2012-10-12 07:52:57.392 Opening remote file.
> 2012-10-12 07:52:57.392 Type: SSH_FXP_OPEN, Size: 52, Number: 7939
< 2012-10-12 07:52:57.392 Type: SSH_FXP_STATUS, Size: 40, Number: 7684
. 2012-10-12 07:52:57.392 Discarding reserved response
< 2012-10-12 07:52:58.478 Type: SSH_FXP_HANDLE, Size: 11, Number: 7939
> 2012-10-12 07:52:58.496 Type: SSH_FXP_WRITE, Size: 64, Number: 8454
> 2012-10-12 07:52:58.496 Type: SSH_FXP_CLOSE, Size: 11, Number: 8708
> 2012-10-12 07:52:58.496 Type: SSH_FXP_SETSTAT, Size: 48, Number: 8201
< 2012-10-12 07:52:58.528 Type: SSH_FXP_STATUS, Size: 49, Number: 8454
< 2012-10-12 07:52:58.742 Type: SSH_FXP_STATUS, Size: 54, Number: 8708
< 2012-10-12 07:52:58.743 Status code: 4, Message: 8708, Server: Transfer failed. AuditID=AA1220001411, Language:
* 2012-10-12 07:52:58.743 (ETerminal) General failure (server should provide error description).
* 2012-10-12 07:52:58.743 Error code: 4
* 2012-10-12 07:52:58.743 Error message from server: Transfer failed. AuditID=AA1220001411
* 2012-10-12 07:52:58.743 Request code: 4
. 2012-10-12 07:52:58.844 Asking user:
. 2012-10-12 07:52:58.844 Cannot close remote file 'FTPTest1.pgp'. ("General failure (server should provide error description).
. 2012-10-12 07:52:58.844 Error code: 4
. 2012-10-12 07:52:58.844 Error message from server: Transfer failed. AuditID=AA1220001411
. 2012-10-12 07:52:58.844 Request code: 4")
* 2012-10-12 07:53:01.245 (EScpSkipFile) Cannot close remote file 'FTPTest1.pgp'.
* 2012-10-12 07:53:01.245 General failure (server should provide error description).
* 2012-10-12 07:53:01.245 Error code: 4
* 2012-10-12 07:53:01.245 Error message from server: Transfer failed. AuditID=AA1220001411
* 2012-10-12 07:53:01.245 Request code: 4
. 2012-10-12 07:53:01.246 Listing directory "/home/cpimod01".
> 2012-10-12 07:53:01.246 Type: SSH_FXP_OPENDIR, Size: 23, Number: 8971
< 2012-10-12 07:53:01.246 Type: SSH_FXP_STATUS, Size: 40, Number: 8201
. 2012-10-12 07:53:01.246 Discarding reserved response
< 2012-10-12 07:53:01.321 Type: SSH_FXP_HANDLE, Size: 11, Number: 8971
> 2012-10-12 07:53:01.322 Type: SSH_FXP_READDIR, Size: 11, Number: 9228
< 2012-10-12 07:53:01.359 Type: SSH_FXP_STATUS, Size: 28, Number: 9228
< 2012-10-12 07:53:01.360 Status code: 1
. 2012-10-12 07:53:01.360 Listing file "/home/cpimod01/..".
> 2012-10-12 07:53:01.360 Type: SSH_FXP_LSTAT, Size: 26, Number: 9479
< 2012-10-12 07:53:01.398 Type: SSH_FXP_ATTRS, Size: 29, Number: 9479
> 2012-10-12 07:53:01.398 Type: SSH_FXP_CLOSE, Size: 11, Number: 9732
I'm not a pro at SFTP and not really sure what exactly is going on here, but am I safe to assume that it is the issue on the client's end?
Do you know if the file, in fact, did transfer and error message only caused by attempting to close a connection? And if so - is there any way to overcome this in code (so it doesn't throw an exception). Or did the failure occur during the transfer?
The other interesting part I noticed in the log is this :
. 2012-10-12 07:52:44.356 We believe the server has signed timestamps bug
Could this be the reason for a failure?
Thank you once again for your help.
N