Error: "Cannot Close Remote File" uploading files larger then around 100K
Protocol: SFTP
Port: 22
Error occurs Uploading file to NetApp server
Error occurs both using WINSCP GUI and command line interface
No errors occur downloading files
File size is relevant to the error:
Files under 10K: Error never occurs
Files 10K – 50K: Error is intermittent, occurring more frequently as the file gets larger.
Files 50K-100K: Error occurs almost all the time
Files > 100K: Error occurs all the time.
Whether the file is uploaded as binary or text is not relevant.
When the WinSCP GUI displays the error window, I click “Abort” and the file transfer operation completes.
The error is associated with the server handling of the SSH_FXP_CLOSE command. The server returns the status message: “no such file”, so the client logs: “Cannot Close Remote File”.
After I click “Abort” to the error, the server returns a directory listing (that includes the uploaded filename) without error.
NOTE: I have turned off temporary file renaming from the client to prevent uploading to a temporary filename and then renaming at the end of the transfer. That was a problem in the past because the FTS server does not allow file renaming.
Here is the relevant part of the log for upload of a 300K file that generated the error
(The log for an upload that generated no error follows this one)
I bolded relevant lines and also translated the HEX status messages – see the lines beginning with “RWINKLER”
(These first 8 lines show the end of the file upload):
… > 2015-11-09 16:38:38.220 75,72,65,20,73,68,6F,77,73,20,74,68,65,20,66,69,6C,65,20,77,61,73,20,6E,6F, > 2015-11-09 16:38:38.220 74,20,66,6F,75,6E,64,2E,20,20,49,20,6E,65,65,64,20,74,6F,20,73,65,65,20,74, > 2015-11-09 16:38:38.220 68,65,20,65,72,72,6F,72,20,61,73,73,6F,63,69,61,74,65,64,20,77,69,74,68,20, > 2015-11-09 16:38:38.220 61,63,74,75,61,6C,20,74,72,61,6E,73,66,65,72,20,69,74,73,65,6C,66,2E,20,49, > 2015-11-09 16:38:38.220 66,20,70,6F,73,73,69,62,6C,65,20,74,72,79,20,74,6F,20,63,61,70,74,75,72,65, > 2015-11-09 16:38:38.220 20,61,20,77,69,72,65,73,68,61,72,6B,20,66,72,6F,6D,20,74,68,65,20,73,65,72, > 2015-11-09 16:38:38.220 76,65,72,20,77,68,69,6C,65,20,74,68,65,20,66,61,69,6C,75,72,65,20,69,73,20, > 2015-11-09 16:38:38.220 68,61,70,70,65,69,6E,67,2E,20,54,68,61,6E,6B,73,2C,20,53,74,65,76,65,0D,0A, . 2015-11-09 16:38:38.220 Sent 24554 bytes . 2015-11-09 16:38:38.220 There are 0 bytes remaining in the send buffer . 2015-11-09 16:38:38.220 Looking for network events . 2015-11-09 16:38:38.220 Detected network event . 2015-11-09 16:38:38.220 Enumerating network events for socket 1116 . 2015-11-09 16:38:38.220 Enumerated 1 network events making 1 cumulative events for socket 1116 . 2015-11-09 16:38:38.220 Handling network read event on socket 1116 with error 0 . 2015-11-09 16:38:38.220 Received 28 bytes (0) . 2015-11-09 16:38:38.220 Read 4 bytes (24 pending) . 2015-11-09 16:38:38.220 Read 24 bytes (0 pending) < 2015-11-09 16:38:38.220 Type: SSH_FXP_STATUS, Size: 24, Number: 5382 < 2015-11-09 16:38:38.220 65,00,00,15,06,00,00,00,00,00,00,00,07,53,75,63,63,65,73,73,00,00,00,00, RWINKLER: Translation: e Success < 2015-11-09 16:38:38.220 Status code: 0 > 2015-11-09 16:38:38.220 Type: SSH_FXP_CLOSE, Size: 13, Number: 5892 > 2015-11-09 16:38:38.220 04,00,00,17,04,00,00,00,04,00,00,00,00, . 2015-11-09 16:38:38.220 Sent 17 bytes . 2015-11-09 16:38:38.220 There are 0 bytes remaining in the send buffer . 2015-11-09 16:38:38.220 Looking for network events . 2015-11-09 16:38:38.220 Timeout waiting for network events > 2015-11-09 16:38:38.220 Type: SSH_FXP_SETSTAT, Size: 82, Number: 2313 > 2015-11-09 16:38:38.220 09,00,00,09,09,00,00,00,3D,2F,76,6F,6C,2F,64,63,32,66,31,33,63,31,5F,73,66, > 2015-11-09 16:38:38.220 74,70,5F,61,75,74,68,6B,62,66,73,31,70,72,5F,76,6F,6C,31,2F,54,65,73,74,5F, > 2015-11-09 16:38:38.220 33,30,30,4B,42,79,74,65,73,20,2D,20,43,6F,70,79,2E,74,78,74,00,00,00,08,56, > 2015-11-09 16:38:38.220 41,1D,FB,56,41,1E,0A, RWINKLER: Translation: =/vol/dc2f13c1_sftp_authkbfs1pr_vol1/Test_300KBytes - Copy.txtVAûVA . 2015-11-09 16:38:38.220 Sent 86 bytes . 2015-11-09 16:38:38.220 There are 0 bytes remaining in the send buffer . 2015-11-09 16:38:38.220 Looking for network events . 2015-11-09 16:38:38.220 Timeout waiting for network events . 2015-11-09 16:38:38.220 Waiting for another 4 bytes . 2015-11-09 16:38:38.220 Looking for incoming data . 2015-11-09 16:38:38.220 Looking for network events . 2015-11-09 16:38:38.220 Detected network event . 2015-11-09 16:38:38.220 Enumerating network events for socket 1116 . 2015-11-09 16:38:38.220 Enumerated 1 network events making 1 cumulative events for socket 1116 . 2015-11-09 16:38:38.220 Handling network read event on socket 1116 with error 0 . 2015-11-09 16:38:38.220 Received 89 bytes (0) . 2015-11-09 16:38:38.220 Read 4 bytes (85 pending) . 2015-11-09 16:38:38.220 Read 24 bytes (61 pending) < 2015-11-09 16:38:38.220 Type: SSH_FXP_STATUS, Size: 24, Number: 5638 < 2015-11-09 16:38:38.220 65,00,00,16,06,00,00,00,00,00,00,00,07,53,75,63,63,65,73,73,00,00,00,00, RWINKLER: Translation: eSuccess . 2015-11-09 16:38:38.220 Read 4 bytes (57 pending) . 2015-11-09 16:38:38.220 Read 29 bytes (28 pending) < 2015-11-09 16:38:38.220 Type: SSH_FXP_STATUS, Size: 29, Number: 5892 < 2015-11-09 16:38:38.220 65,00,00,17,04,00,00,00,02,00,00,00,0C,4E,6F,20,73,75,63,68,20,66,69,6C,65, < 2015-11-09 16:38:38.220 00,00,00,00, RWINKLER: Translation: e ________________________________________ [1]No such file < 2015-11-09 16:38:38.220 Status code: 2, Message: 5892, Server: No such file, Language: * 2015-11-09 16:38:38.220 (ETerminal) No such file or directory. * 2015-11-09 16:38:38.220 Error code: 2 * 2015-11-09 16:38:38.220 Error message from server: No such file . 2015-11-09 16:38:38.220 Asking user: . 2015-11-09 16:38:38.220 Cannot close remote file 'Test_300KBytes - Copy.txt'. ("No such file or directory. . 2015-11-09 16:38:38.220 Error code: 2 . 2015-11-09 16:38:38.220 Error message from server: No such file")
HERE IS Part of log for a file < 10K that did not generate the error:
> 2015-11-09 18:01:46.057 6F,20,74,68,65,20,63,61,73,65,20,6C,6F,6F,6B,65,64,20,74,6F,20,62,65,20,61, > 2015-11-09 18:01:46.057 20,6A,6F,62,20,6C,6F,67,2E,20,54,68,65,20,66,61,69,6C,69,75,72,65,20,73,68, > 2015-11-09 18:01:46.057 6F,77,73,20,74,68,65,20,66,69,6C,65,20,77,61,73,20,6E,6F,74,20,66,6F,75,6E, > 2015-11-09 18:01:46.057 64,2E,20,20,49,20,6E,65,65,64,20,74,6F,20,73,65,65,20,74,68,65,20,65,72,72, > 2015-11-09 18:01:46.057 6F,72,20,61,73,73,6F,63,69,61,74,65,64,20,77,69,74,68,20,61,63,74,75,61,6C, > 2015-11-09 18:01:46.057 20,74,72,61,6E,73,66,65,72,20,69,74,73,65,6C,66,2E,20,49,66,20,70,6F,73,73, > 2015-11-09 18:01:46.057 69,62,6C,65,20,74,72,79,20,74,6F,20,63,61,70,74,75,72,65,20,61,20,77,69,72, > 2015-11-09 18:01:46.057 65,73,68,61,72,6B,20,66,72,6F,6D,20,74,68,65,20,73,65,72,76,65,72,20,77,68, > 2015-11-09 18:01:46.057 69,6C,65,20,74,68,65,20,66,61,69,6C,75,72,65,20,69,73,20,68,61,70,70,65,69, > 2015-11-09 18:01:46.057 6E,67,2E,20,54,68,61,6E,6B,73,2C,20,53,74,65,76,65,0D,0A, . 2015-11-09 18:01:46.057 Sent 1323 bytes . 2015-11-09 18:01:46.057 There are 0 bytes remaining in the send buffer . 2015-11-09 18:01:46.057 Looking for network events . 2015-11-09 18:01:46.057 Timeout waiting for network events > 2015-11-09 18:01:46.057 Type: SSH_FXP_CLOSE, Size: 13, Number: 3332 > 2015-11-09 18:01:46.057 04,00,00,0D,04,00,00,00,04,00,00,00,00, . 2015-11-09 18:01:46.057 Sent 17 bytes . 2015-11-09 18:01:46.057 There are 0 bytes remaining in the send buffer . 2015-11-09 18:01:46.057 Looking for network events . 2015-11-09 18:01:46.057 Timeout waiting for network events > 2015-11-09 18:01:46.057 Type: SSH_FXP_SETSTAT, Size: 74, Number: 2313 > 2015-11-09 18:01:46.057 09,00,00,09,09,00,00,00,35,2F,76,6F,6C,2F,64,63,32,66,31,33,63,31,5F,73,66, > 2015-11-09 18:01:46.057 74,70,5F,61,75,74,68,6B,62,66,73,31,70,72,5F,76,6F,6C,31,2F,54,65,73,74,5F, > 2015-11-09 18:01:46.057 31,30,4B,42,79,74,65,73,2E,74,78,74,00,00,00,08,56,41,1C,E3,56,41,1D,39, RWINKLER: TRANSLATION: 5/vol/dc2f13c1_sftp_authkbfs1pr_vol1/Test_10KBytes.txtVA ãVA9 . 2015-11-09 18:01:46.057 Sent 78 bytes . 2015-11-09 18:01:46.057 There are 0 bytes remaining in the send buffer . 2015-11-09 18:01:46.057 Looking for network events . 2015-11-09 18:01:46.057 Timeout waiting for network events . 2015-11-09 18:01:46.057 Waiting for another 4 bytes . 2015-11-09 18:01:46.057 Looking for incoming data . 2015-11-09 18:01:46.057 Looking for network events . 2015-11-09 18:01:46.073 Detected network event . 2015-11-09 18:01:46.073 Enumerating network events for socket 1120 . 2015-11-09 18:01:46.073 Enumerated 1 network events making 1 cumulative events for socket 1120 . 2015-11-09 18:01:46.073 Handling network read event on socket 1120 with error 0 . 2015-11-09 18:01:46.073 Received 28 bytes (0) . 2015-11-09 18:01:46.073 Read 4 bytes (24 pending) . 2015-11-09 18:01:46.073 Read 24 bytes (0 pending) < 2015-11-09 18:01:46.073 Type: SSH_FXP_STATUS, Size: 24, Number: 3078 < 2015-11-09 18:01:46.073 65,00,00,0C,06,00,00,00,00,00,00,00,07,53,75,63,63,65,73,73,00,00,00,00, RWINKLER: TRANSLATION: eSuccess . 2015-11-09 18:01:46.073 Waiting for another 4 bytes . 2015-11-09 18:01:46.073 Looking for incoming data . 2015-11-09 18:01:46.073 Looking for network events . 2015-11-09 18:01:46.073 Detected network event . 2015-11-09 18:01:46.073 Enumerating network events for socket 1120 . 2015-11-09 18:01:46.073 Enumerated 1 network events making 1 cumulative events for socket 1120 . 2015-11-09 18:01:46.073 Handling network read event on socket 1120 with error 0 . 2015-11-09 18:01:46.073 Received 28 bytes (0) . 2015-11-09 18:01:46.073 Read 4 bytes (24 pending) . 2015-11-09 18:01:46.073 Read 24 bytes (0 pending) < 2015-11-09 18:01:46.073 Type: SSH_FXP_STATUS, Size: 24, Number: 3332 < 2015-11-09 18:01:46.073 65,00,00,0D,04,00,00,00,00,00,00,00,07,53,75,63,63,65,73,73,00,00,00,00, RWINKLER: TRANSLATION: e ________________________________________ Success < 2015-11-09 18:01:46.073 Status code: 0 . 2015-11-09 18:01:46.073 Preserving timestamp [2015-11-09T22:24:57.000Z] . 2015-11-09 18:01:46.073 Waiting for another 4 bytes . 2015-11-09 18:01:46.073 Looking for incoming data . 2015-11-09 18:01:46.073 Looking for network events . 2015-11-09 18:01:46.275 Detected network event . 2015-11-09 18:01:46.275 Enumerating network events for socket 1120 . 2015-11-09 18:01:46.275 Enumerated 1 network events making 1 cumulative events for socket 1120 . 2015-11-09 18:01:46.275 Handling network read event on socket 1120 with error 0 . 2015-11-09 18:01:46.275 Received 28 bytes (0) . 2015-11-09 18:01:46.275 Read 4 bytes (24 pending) . 2015-11-09 18:01:46.275 Read 24 bytes (0 pending) < 2015-11-09 18:01:46.275 Type: SSH_FXP_STATUS, Size: 24, Number: 2313 < 2015-11-09 18:01:46.275 65,00,00,09,09,00,00,00,00,00,00,00,07,53,75,63,63,65,73,73,00,00,00,00, RWINKLER: TRANSLATION: e Success < 2015-11-09 18:01:46.275 Status code: 0 . 2015-11-09 18:01:46.275 Transfer done: 'F:\Temp\Test_10KBytes.txt' [9486]