Hi,
There is an external server which I'm connecting to via SFTP. I can connect fine using the GUI, view files, and download them.
When trying to download from code I get the dreaded error code 4. I can connect and
ListDirectory
fine, but get an error whether trying to
GetFiles
all at once, or one at a time.
This is everything from the log up to the first Error Code 4.
Any ideas?
Thanks
[2021-03-26 11:55:42.749] [0001] .NET Framework build
[2021-03-26 11:55:42.749] [0001] Executing assembly: WinSCPnet, Version=1.6.5.10071, Culture=neutral, PublicKeyToken=2271ec4a3c56d0bf
[2021-03-26 11:55:42.749] [0001] Executing assembly codebase: file:///C:/Programs/FileTransfers/WinSCPnet.DLL
[2021-03-26 11:55:42.749] [0001] Executing assembly location: C:\Programs\FileTransfers\WinSCPnet.dll
[2021-03-26 11:55:42.749] [0001] Entry Assembly: FileTransfers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[2021-03-26 11:55:42.749] [0001] Operating system: Microsoft Windows NT 6.2.9200.0
[2021-03-26 11:55:42.749] [0001] Timezone: 00:00; GMT Standard Time
[2021-03-26 11:55:42.749] [0001] User: xxxxxxxxxxxxx; Interactive: True
[2021-03-26 11:55:42.749] [0001] Runtime: 4.0.30319.42000
[2021-03-26 11:55:42.749] [0001] Console encoding: Input: Western European (DOS) (850); Output: Western European (DOS) (850)
[2021-03-26 11:55:42.749] [0001] Working directory: C:\Programs\FileTransfers
[2021-03-26 11:55:42.749] [0001] Assembly path: C:\Programs\FileTransfers\WinSCPnet.DLL
[2021-03-26 11:55:42.749] [0001] Assembly product version: 5.15.9.0
[2021-03-26 11:55:42.796] [0001] Session.GetFiles entering
[2021-03-26 11:55:42.796] [0001] Command: [get -nopermissions -preservetime -transfer="binary" -- "processing//processing/000000000013 (1).TXT" "C:\Temp\"]
[2021-03-26 11:55:42.796] [0001] ExeSessionProcess.ExecuteCommand entering
[2021-03-26 11:55:42.796] [0001] ExeSessionProcess.ExecuteCommand leaving
[2021-03-26 11:55:42.796] [0001] SessionLogReader.Read entering
[2021-03-26 11:55:42.796] [0001] Waiting for log update and dispatching events for 50
[2021-03-26 11:55:42.796] [0001] Output: [winscp> pwd]
[2021-03-26 11:55:42.796] [0001] Output: [/]
[2021-03-26 11:55:42.796] [0004] Scheduling output: [winscp> get -nopermissions -preservetime -transfer="binary" -- "processing//processing/000000000013 (1).TXT" "C:\Temp\"]
[2021-03-26 11:55:42.796] [0001] Output: [winscp> get -nopermissions -preservetime -transfer="binary" -- "processing//processing/000000000013 (1).TXT" "C:\Temp\"]
[2021-03-26 11:55:42.796] [0004] Releasing communication structure
[2021-03-26 11:55:42.796] [0004] Released communication structure
[2021-03-26 11:55:42.796] [0004] 2nd generation collection count: 1
[2021-03-26 11:55:42.796] [0004] Total memory allocated: 5251504
[2021-03-26 11:55:42.796] [0004] Waiting for request event
[2021-03-26 11:55:42.827] [0004] Got request event
[2021-03-26 11:55:42.827] [0004] ExeSessionProcess.ProcessEvent entering
[2021-03-26 11:55:42.827] [0004] Acquiring communication structure
[2021-03-26 11:55:42.827] [0004] Acquired communication structure
[2021-03-26 11:55:42.827] [0004] Print: 000000000013 (1).TXT | 0 B | 0.0 KB/s | binary | 0%
[2021-03-26 11:55:42.827] [0004] Buffered from-beginning message [000000000013 (1).TXT | 0 B | 0.0 KB/s | binary | 0%]
[2021-03-26 11:55:42.827] [0004] Got incomplete progress output
[2021-03-26 11:55:42.827] [0004] Releasing communication structure
[2021-03-26 11:55:42.827] [0004] Released communication structure
[2021-03-26 11:55:42.827] [0004] ExeSessionProcess.ProcessEvent leaving
[2021-03-26 11:55:42.827] [0004] 2nd generation collection count: 1
[2021-03-26 11:55:42.827] [0004] Total memory allocated: 5267888
[2021-03-26 11:55:42.827] [0004] Waiting for request event
[2021-03-26 11:55:42.859] [0001] Read 168 bytes from log
[2021-03-26 11:55:42.859] [0001] Read node 20: Whitespace
[2021-03-26 11:55:42.859] [0001] Log contents:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="xxxxxxxx@xxxxxxxxxxxxxx" start="2021-03-26T11:55:40.249Z">
<group name="open sftp://F30788AB:***@xxxxxxxxxxxxxx:22 -hostkey="ssh-rsa 2048 5zt6BTseLlT+Cs5cnp8PBjQwM/dLa738BeXSsHeCaag=" -timeout=15" start="2021-03-26T11:55:42.078Z">
</group>
<group name="pwd" start="2021-03-26T11:55:42.749Z">
<cwd>
<cwd value="/" />
<result success="true" />
</cwd>
</group>
<group name="get -nopermissions -preservetime -transfer="binary" -- "processing//processing/000000000013 (1).TXT" "C:\Temp\"" start="2021-03-26T11:55:42.796Z">
[2021-03-26 11:55:42.859] [0001] SessionLogReader.Read leaving
[2021-03-26 11:55:42.859] [0001] SessionLogReader.Read entering
[2021-03-26 11:55:42.859] [0001] Read 25 bytes from log
[2021-03-26 11:55:42.859] [0001] Read node 21: Element group
[2021-03-26 11:55:42.859] [0001] Log contents has not changed
[2021-03-26 11:55:42.859] [0001] SessionLogReader.Read leaving
[2021-03-26 11:55:42.859] [0001] Session.CreateProgressHandler entering
[2021-03-26 11:55:42.859] [0001] Session.CreateProgressHandler leaving
[2021-03-26 11:55:42.859] [0001] SessionLogReader.Read entering
[2021-03-26 11:55:42.859] [0001] Waiting for log update and dispatching events for 50
[2021-03-26 11:55:42.921] [0001] Waiting for log update and dispatching events for 100
[2021-03-26 11:55:42.937] [0004] 2nd generation collection count: 1
[2021-03-26 11:55:42.937] [0004] Total memory allocated: 5325220
[2021-03-26 11:55:42.937] [0004] Waiting for request event
[2021-03-26 11:55:43.031] [0001] Waiting for log update and dispatching events for 200
[2021-03-26 11:55:43.046] [0004] 2nd generation collection count: 1
[2021-03-26 11:55:43.046] [0004] Total memory allocated: 5333400
[2021-03-26 11:55:43.046] [0004] Waiting for request event
[2021-03-26 11:55:43.062] [0004] Got request event
[2021-03-26 11:55:43.062] [0004] ExeSessionProcess.ProcessEvent entering
[2021-03-26 11:55:43.062] [0004] Acquiring communication structure
[2021-03-26 11:55:43.062] [0004] Acquired communication structure
[2021-03-26 11:55:43.062] [0004] Print:
Copying files from remote side failed.
General failure (server should provide error description).
Error code: 4
Error message from server:
Common reasons for the Error code 4 are:
- Renaming a file to a name of already existing file.
- Creating a directory that already exists.
- Moving a remote file to a different filesystem (HDD).
- Uploading a file to a full filesystem (HDD).
- Exceeding a user disk quota.