liximomo / vscode-sftp

Super fast sftp/ftp extension for VS Code
MIT License
1.51k stars 265 forks source link

Connection Timed Out (protocol: ftp, port: 21) #730

Closed atlas-ark closed 4 years ago

atlas-ark commented 4 years ago

Do you read the FAQ?

Describe the bug I'm trying to download files from server. My configuration is simple (I only edited the default one with correct port, protocol, host, username and password:

{
    "name": "My Server",
    "host": "<myhost>",
    "protocol": "ftp",
    "port": 21,
    "username": "<myusername>",
    "password": "<mypassword>",
    "remotePath": "/",
    "uploadOnSave": true
}

The problem is that it starts to download something (not always, but when it does, it downloads only folders), then it ends with the "Connection timed out" error:

[info] config at /home/user/folder {"remotePath":"/","uploadOnSave":true,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"ftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"My Server","host":"files.000webhost.com","port":21,"username":"******","password":"******"}
[02-23 12:01:08] [error] Error: LIST: Connection timed out
    at v (/home/user/.vscode-oss/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:110952)
    at d.<anonymous> (/home/user/.vscode-oss/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:111675)
    at d.emit (events.js:200:13)
    at d._write (/home/user/.vscode-oss/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:124497)
    at doWrite (_stream_writable.js:417:12)
    at writeOrBuffer (_stream_writable.js:401:5)
    at d.Writable.write (_stream_writable.js:301:11)
    at Socket.p (/home/user/.vscode-oss/extensions/liximomo.sftp-1.12.9/dist/extension.js:70:114046)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:166:17) 

I've already tried to increase the connectTimeout value without effort. Another thing I can say is that with Atom, same server, everything is working perfectly and super fast (with no need to edit timeouts).

I've used the ftp-simple extension for Code and it's working, but it's slow, not accurate (when downloading a folder, some files are missing randomly).

I'm using Code (open-source vanilla version), but I've tried both the "tweaked" vscodium-bin and the visual-studio-code-bin package. I'm running Arch Linux and all the packages are on their latest version.

To Reproduce Steps to reproduce the behavior:

  1. Ctrl+Shift+P>SFTP Config>(opened a folder)>(entered my config)>(saved)
  2. Left panel: Right click>Sync Remote -> Local
  3. Error as above.

Expected behavior To download all the files like a FTP extension should be able to do (like Atom, for example). If that's not possible, I can't use Code/VSCode anymore.

Screenshots I think they are not needed, but, if needed, please ask and I will send them.

Desktop (please complete the following information):

Extension Logs from Startup - required

[02-23 12:17:06] [debug] register command "Cancel All Transfer" from "./commandCancelAllTransfer.ts"
[02-23 12:17:06] [debug] register command "Config" from "./commandConfig.ts"
[02-23 12:17:06] [debug] register command "List Active Folder" from "./commandListActiveFolder.ts"
[02-23 12:17:06] [debug] register command "Open Ssh Connection" from "./commandOpenSshConnection.ts"
[02-23 12:17:06] [debug] register command "Set Profile" from "./commandSetProfile.ts"
[02-23 12:17:06] [debug] register command "Toggle Output Panel" from "./commandToggleOutputPanel.ts"
[02-23 12:17:06] [debug] register command "Upload Changed Files" from "./commandUploadChangedFiles.ts"
[02-23 12:17:06] [debug] register command "Delete Remote" from "./fileCommandDeleteRemote.ts"
[02-23 12:17:06] [debug] register command "Diff" from "./fileCommandDiff.ts"
[02-23 12:17:06] [debug] register command "Diff Active File" from "./fileCommandDiffActiveFile.ts"
[02-23 12:17:06] [debug] register command "Download" from "./fileCommandDownload.ts"
[02-23 12:17:06] [debug] register command "Download Active File" from "./fileCommandDownloadActiveFile.ts"
[02-23 12:17:06] [debug] register command "Download Active Folder" from "./fileCommandDownloadActiveFolder.ts"
[02-23 12:17:06] [debug] register command "Download File" from "./fileCommandDownloadFile.ts"
[02-23 12:17:06] [debug] register command "Download Folder" from "./fileCommandDownloadFolder.ts"
[02-23 12:17:06] [debug] register command "Download Force" from "./fileCommandDownloadForce.ts"
[02-23 12:17:06] [debug] register command "Download Project" from "./fileCommandDownloadProject.ts"
[02-23 12:17:06] [debug] register command "Edit In Local" from "./fileCommandEditInLocal.ts"
[02-23 12:17:06] [debug] register command "List" from "./fileCommandList.ts"
[02-23 12:17:06] [debug] register command "List All" from "./fileCommandListAll.ts"
[02-23 12:17:06] [debug] register command "Reveal In Explorer" from "./fileCommandRevealInExplorer.ts"
[02-23 12:17:06] [debug] register command "Reveal In Remote Explorer" from "./fileCommandRevealInRemoteExplorer.ts"
[02-23 12:17:06] [debug] register command "Sync Both Directions" from "./fileCommandSyncBothDirections.ts"
[02-23 12:17:06] [debug] register command "Sync Local To Remote" from "./fileCommandSyncLocalToRemote.ts"
[02-23 12:17:06] [debug] register command "Sync Remote To Local" from "./fileCommandSyncRemoteToLocal.ts"
[02-23 12:17:06] [debug] register command "Upload" from "./fileCommandUpload.ts"
[02-23 12:17:06] [debug] register command "Upload Active File" from "./fileCommandUploadActiveFile.ts"
[02-23 12:17:06] [debug] register command "Upload Active Folder" from "./fileCommandUploadActiveFolder.ts"
[02-23 12:17:06] [debug] register command "Upload File" from "./fileCommandUploadFile.ts"
[02-23 12:17:06] [debug] register command "Upload Folder" from "./fileCommandUploadFolder.ts"
[02-23 12:17:06] [debug] register command "Upload Force" from "./fileCommandUploadForce.ts"
[02-23 12:17:06] [debug] register command "Upload Project" from "./fileCommandUploadProject.ts"
[02-23 12:17:06] [info] config at /home/user/folder {"remotePath":"/","uploadOnSave":true,"downloadOnOpen":false,"ignore":[],"concurrency":4,"protocol":"ftp","connectTimeout":10000,"interactiveAuth":false,"secure":false,"remoteTimeOffsetInHours":0,"name":"My Server","host":"myservercom","port":21,"username":"******","password":"******"}
[02-23 12:17:23] [trace] run command 'Sync Remote To Local'
[02-23 12:17:23] [trace] handle sync remote ➞ local for /home/user/folder/remote_root
[02-23 12:17:23] [debug] < '220 ProFTPD Server (myserver.com) [***]\r\n'
[02-23 12:17:23] [debug] > USER ******
[02-23 12:17:23] [debug] < '331 User ****** OK. Password required\r\n'
[02-23 12:17:23] [debug] > PASS ******
[02-23 12:17:23] [debug] > FEAT
[02-23 12:17:24] [debug] < '211-Features:\r\n'
[02-23 12:17:24] [debug] > TYPE I
[02-23 12:17:24] [debug] < '200 TYPE is now 8-bit binary\r\n'
[02-23 12:17:24] [debug] > PASV
[02-23 12:17:24] [debug] < '227 Entering Passive Mode (145,14,144,209,130,92).\r\n'
[02-23 12:17:24] [debug] > LIST /path/to/remote
[02-23 12:17:24] [debug] < '150 Connecting to port 49642\r\n'
[02-23 12:17:24] [debug] < '226-Options: -a -l \r\n226 32 matches total\r\n'
[02-23 12:17:24] [debug] > PASV
[02-23 12:17:24] [debug] < '227 Entering Passive Mode (145,14,144,209,181,77).\r\n'
[02-23 12:17:24] [debug] > LIST /path/to/another/folder
[02-23 12:17:25] [debug] < '150 Connecting to port 47006\r\n'
[02-23 12:17:25] [debug] < '226-Options: -a -l \r\n226 18 matches total\r\n'
[02-23 12:17:25] [debug] > PASV
[02-23 12:17:25] [debug] < '227 Entering Passive Mode (145,14,144,209,159,173).\r\n'
[02-23 12:17:25] [debug] > LIST /path/to/another/folder
[02-23 12:17:25] [debug] < '150 Connecting to port 42380\r\n'
[02-23 12:17:25] [debug] < '226-Options: -a -l \r\n226 97 matches total\r\n'
[02-23 12:17:25] [debug] > PASV
[02-23 12:17:25] [debug] < '227 Entering Passive Mode (145,14,144,209,166,209).\r\n'
[02-23 12:17:25] [debug] > LIST /path/to/another/folder
[02-23 12:17:25] [debug] < '150 Connecting to port 46883\r\n226-Options: -a -l \r\n226 10 matches total\r\n'
[02-23 12:17:25] [debug] > PASV
[02-23 12:17:25] [debug] < '227 Entering Passive Mode (145,14,144,209,202,13).\r\n'
[02-23 12:17:26] [debug] > LIST /path/to/another/folder
[02-23 12:17:26] [debug] < '150 Connecting to port 48954\r\n226-Options: -a -l \r\n226 208 matches total\r\n'
[02-23 12:17:26] [debug] > PASV
[02-23 12:17:26] [debug] < '227 Entering Passive Mode (145,14,144,209,149,228).\r\n'
[02-23 12:17:26] [debug] > LIST /path/to/another/folder
[02-23 12:17:26] [debug] < '150 Connecting to port 38405\r\n'
[02-23 12:17:26] [debug] < '226-Options: -a -l \r\n226 107 matches total\r\n'
[02-23 12:17:26] [debug] > PASV
[02-23 12:17:26] [debug] < '227 Entering Passive Mode (145,14,144,209,201,154).\r\n'
[02-23 12:17:27] [debug] > LIST /path/to/another/folder
[02-23 12:17:27] [debug] < '150 Connecting to port 43504\r\n'
[02-23 12:17:27] [debug] < '226-Options: -a -l \r\n226 69 matches total\r\n'
[02-23 12:17:27] [debug] > PASV
[02-23 12:17:27] [debug] < '227 Entering Passive Mode (145,14,144,209,152,210).\r\n'
[02-23 12:17:27] [debug] > LIST /path/to/another/folder
[02-23 12:17:27] [debug] < '150 Connecting to port 39565\r\n'
[02-23 12:17:27] [debug] < '226-Options: -a -l \r\n226 107 matches total\r\n'
[02-23 12:17:27] [debug] > PASV
[02-23 12:17:27] [debug] < '227 Entering Passive Mode (145,14,144,209,157,168).\r\n'
[02-23 12:17:27] [debug] > LIST /path/to/another/folder
[02-23 12:17:28] [debug] < '150 Connecting to port 46348\r\n'
[02-23 12:17:28] [debug] < '226-Options: -a -l \r\n226 94 matches total\r\n'
[02-23 12:17:28] [debug] > PASV
[02-23 12:17:28] [debug] < '227 Entering Passive Mode (145,14,144,209,177,150).\r\n'
[02-23 12:17:28] [debug] > LIST /path/to/another/folder
[02-23 12:17:28] [debug] < '150 Connecting to port 42105\r\n226-Options: -a -l \r\n226 3 matches total\r\n'
[02-23 12:17:28] [debug] > PASV
[02-23 12:17:28] [debug] < '227 Entering Passive Mode (145,14,144,209,199,188).\r\n'
[02-23 12:17:28] [debug] > LIST /path/to/another/folder
[02-23 12:17:28] [debug] < '150 Connecting to port 38408\r\n226-Options: -a -l \r\n226 31 matches total\r\n'
[02-23 12:17:28] [debug] > PASV
[02-23 12:17:28] [debug] < '227 Entering Passive Mode (145,14,144,209,193,29).\r\n'
[02-23 12:17:29] [debug] > LIST /path/to/another/folder
[02-23 12:17:29] [debug] < '150 Connecting to port 40642\r\n226-Options: -a -l \r\n226 11 matches total\r\n'
[02-23 12:17:29] [debug] > PASV
[02-23 12:17:29] [debug] < '227 Entering Passive Mode (145,14,144,209,140,215).\r\n'
[02-23 12:17:29] [debug] > LIST /path/to/another/folder
[02-23 12:17:29] [debug] < '150 Connecting to port 49910\r\n226-Options: -a -l \r\n226 7 matches total\r\n'
[02-23 12:17:29] [debug] > PASV
[02-23 12:17:29] [debug] < '227 Entering Passive Mode (145,14,144,209,139,54).\r\n'
[02-23 12:17:29] [debug] > LIST /path/to/another/folder
[02-23 12:17:30] [debug] < '150 Connecting to port 38174\r\n226-Options: -a -l \r\n226 28 matches total\r\n'
[02-23 12:17:30] [debug] > PASV
[02-23 12:17:30] [debug] < '227 Entering Passive Mode (145,14,144,209,137,81).\r\n'
[02-23 12:17:30] [debug] > LIST /path/to/another/folder
[02-23 12:17:30] [debug] < '150 Connecting to port 50785\r\n226-Options: -a -l \r\n226 5 matches total\r\n'
[02-23 12:17:30] [debug] > PASV
[02-23 12:17:30] [debug] < '227 Entering Passive Mode (145,14,144,209,177,116).\r\n'
[02-23 12:17:30] [debug] > LIST /path/to/another/folder
[02-23 12:17:30] [debug] < '150 Connecting to port 53688\r\n'
[02-23 12:17:30] [debug] < '226-Options: -a -l \r\n226 9 matches total\r\n'
[02-23 12:17:30] [debug] > PASV
[02-23 12:17:30] [debug] < '227 Entering Passive Mode (145,14,144,209,178,127).\r\n'
[02-23 12:17:31] [debug] > LIST /path/to/another/folder
[02-23 12:17:31] [debug] < '150 Connecting to port 38526\r\n226-Options: -a -l \r\n226 7 matches total\r\n'
[02-23 12:17:31] [debug] > PASV
[02-23 12:17:31] [debug] < '227 Entering Passive Mode (145,14,144,209,198,219).\r\n'
[02-23 12:17:31] [debug] > LIST /path/to/another/folder
[02-23 12:17:31] [debug] < '150 Connecting to port 36841\r\n226-Options: -a -l \r\n226 2 matches total\r\n'
[02-23 12:17:31] [debug] > PASV
[02-23 12:17:31] [debug] < '227 Entering Passive Mode (145,14,144,209,209,221).\r\n'
[02-23 12:17:31] [debug] > LIST /path/to/another/folder
[02-23 12:17:31] [debug] < '150 Connecting to port 31573\r\n226-Options: -a -l \r\n226 4 matches total\r\n'
[02-23 12:17:31] [debug] > PASV
[02-23 12:17:32] [debug] < '227 Entering Passive Mode (145,14,144,209,197,96).\r\n'
[02-23 12:17:32] [debug] > LIST /path/to/another/folder
[02-23 12:17:32] [debug] < '150 Connecting to port 38612\r\n'
[02-23 12:17:32] [debug] < '226-Options: -a -l \r\n226 21 matches total\r\n'
[02-23 12:17:32] [debug] > PASV
[02-23 12:17:32] [debug] < '227 Entering Passive Mode (145,14,144,209,183,170).\r\n'
[02-23 12:17:32] [debug] > LIST /path/to/another/folder
[02-23 12:17:32] [debug] < '150 Connecting to port 50450\r\n'
[02-23 12:17:32] [debug] < '226-Options: -a -l \r\n226 12 matches total\r\n'
[02-23 12:17:32] [debug] > PASV
[02-23 12:17:32] [debug] < '227 Entering Passive Mode (145,14,144,209,152,42).\r\n'
[02-23 12:17:32] [debug] > LIST /path/to/another/folder
[02-23 12:17:33] [debug] < '150 Connecting to port 33900\r\n'
[02-23 12:17:33] [debug] < '226-Options: -a -l \r\n226 22 matches total\r\n'
[02-23 12:17:33] [debug] > PASV
[02-23 12:17:33] [debug] < '227 Entering Passive Mode (145,14,144,209,169,202).\r\n'
[02-23 12:17:33] [debug] > LIST /path/to/another/folder
[02-23 12:17:33] [debug] < '150 Connecting to port 43628\r\n226-Options: -a -l \r\n226 30 matches total\r\n'
[02-23 12:17:33] [debug] > PASV
[02-23 12:17:33] [debug] < '227 Entering Passive Mode (145,14,144,209,136,160).\r\n'
[02-23 12:17:33] [debug] > LIST /path/to/another/folder
[02-23 12:17:33] [debug] < '150 Connecting to port 48077\r\n226-Options: -a -l \r\n226 4 matches total\r\n'
[02-23 12:17:33] [debug] > PASV
[02-23 12:17:34] [debug] < '227 Entering Passive Mode (145,14,144,209,137,111).\r\n'
[02-23 12:17:34] [debug] > LIST /path/to/another/folder
[02-23 12:17:34] [debug] < '150 Connecting to port 53826\r\n'
[02-23 12:17:34] [debug] < '226-Options: -a -l \r\n226 12 matches total\r\n'
[02-23 12:17:34] [debug] > PASV
[02-23 12:17:34] [debug] < '227 Entering Passive Mode (145,14,144,209,145,115).\r\n'
[02-23 12:17:34] [debug] > LIST /path/to/another/folder
[02-23 12:17:34] [debug] < '150 Connecting to port 50439\r\n226-Options: -a -l \r\n226 3 matches total\r\n'
[02-23 12:17:34] [debug] > PASV
[02-23 12:17:35] [debug] < '227 Entering Passive Mode (145,14,144,209,140,241).\r\n'
[02-23 12:17:35] [debug] > LIST /path/to/another/folder
[02-23 12:17:35] [debug] < '150 Connecting to port 31315\r\n'
[02-23 12:17:38] [debug] < '500 LIST: Connection timed out\r\n'
[02-23 12:17:38] [debug] > PASV
[02-23 12:17:38] [debug] < '227 Entering Passive Mode (145,14,144,209,200,26).\r\n'
[02-23 12:17:38] [debug] > LIST /path/to/another/folder
[02-23 12:17:38] [debug] < '200 PORT command successful\r\n150 Connecting to port 31672\r\n'
[02-23 12:17:38] [debug] < '226-Options: -a -l \r\n226 37 matches total\r\n'
[02-23 12:17:48] [debug] > NOOP
[02-23 12:17:49] [debug] < '200 Zzz...\r\n'
[02-23 12:17:59] [debug] > NOOP
[02-23 12:17:59] [debug] < '200 Zzz...\r\n'
...
atlas-ark commented 4 years ago

Issue solved somehow, now FTP is working like a charm, at least for me!

NatM97 commented 5 months ago

Hi, how did you solve this ?