-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Remote-SSH Bug]: VS Code Server initialization hangs on creating forwarded ports #8942
Comments
The workaround I'm using right now is to revert to version 0.102.0. Everything works fine in that version. In versions 0.105.0 through 0.106.1, the forwarded port opens, but seems unable to actually carry traffic. It's very strange. Almost as though it carries the first few packets and then falls over. |
The same issue. |
I am experiencing the same issue after updating to the latest version. |
+1 same issue |
Same on macOS. |
+1, can confirm the same issue on a Mac M2. Rolling back to Remote - SSH v0.105.1 solved it for me. |
Try disabling the |
It seems that switching to the pre-release v0.107.2023090815 build also seems to fix this. |
How to install pre-release v0.107.2023090815 build on mac? thanks |
0.106.3 was just released with the fix |
@roblourens from this log, it looks like the first connection was made using a traditional connection and the followup resolutions (after default package.json configs were applied, perhaps?) tried to resolve using the exec server, which caused things to fall apart. I think this was solely an artifact of the now-fixed default config value application, and so this can be considered fixed. What do you think? |
OP here - I just confirmed that 0.106.3 contains a fix (whatever it was). It's back to working. I'd consider this issue closed. |
Is there an existing issue for this bug?
Required Troubleshooting Steps
remote.SSH.useLocalServer
settingConnect Locally
It connects successfully
->
No response
Expected Behavior
On launching my existing remote workspace, the VS Code Server would initialize and I would be able to use VS Code normally.
Instead, the VS Code Server initialization routine never got past the creating forwarded ports step. This threw it into a repeated cycle of needing to reconnect to the server, which caused the same issue to happen over and over.
Steps To Reproduce
Remote-SSH Log
[02:01:45.759] Log Level: 2
[02:01:45.763] VS Code version: 1.82.0
[02:01:45.763] Remote-SSH version: remote-ssh@0.106.2
[02:01:45.763] darwin arm64
[02:01:45.766] SSH Resolver called for "ssh-remote+titanforge", attempt 1
[02:01:45.766] "remote.SSH.useLocalServer": true
[02:01:45.766] "remote.SSH.path": undefined
[02:01:45.766] "remote.SSH.configFile": undefined
[02:01:45.766] "remote.SSH.useFlock": true
[02:01:45.766] "remote.SSH.lockfilesInTmp": false
[02:01:45.766] "remote.SSH.localServerDownload": auto
[02:01:45.766] "remote.SSH.remoteServerListenOnSocket": false
[02:01:45.766] "remote.SSH.showLoginTerminal": false
[02:01:45.766] "remote.SSH.defaultExtensions": []
[02:01:45.766] "remote.SSH.loglevel": 2
[02:01:45.766] "remote.SSH.enableDynamicForwarding": true
[02:01:45.766] "remote.SSH.enableRemoteCommand": false
[02:01:45.766] "remote.SSH.serverPickPortsFromRange": {}
[02:01:45.769] "remote.SSH.serverInstallPath": {}
[02:01:45.770] SSH Resolver called for host: titanforge
[02:01:45.770] Setting up SSH remote "titanforge"
[02:01:45.772] Acquiring local install lock: /var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-remote-ssh-d858046c-install.lock
[02:01:45.772] Looking for existing server data file at /Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json
[02:01:45.772] Using commit id "8b617bd08fd9e3fc94d14adb8d358b56e3f72314" and quality "stable" for server
[02:01:45.774] Install and start server if needed
[02:01:45.775] PATH: /Users/druths/repos/druths-github/druths-sysconfig/scripts:/Users/druths/.gems/bin:/Users/druths/Library/Python/3.11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/druths/.fzf/bin
[02:01:45.775] Checking ssh with "ssh -V"
[02:01:45.779] > OpenSSH_9.0p1, LibreSSL 3.3.6
[02:01:45.781] askpass server listening on /var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-20d733b78ea51696132aebf43512baf5ad2982c1.sock
[02:01:45.781] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-15dad3dfbae36bb8608fc55880baa4db85c0ee8d.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","51920","-o","ConnectTimeout=15","titanforge"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json"}
[02:01:45.781] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.qBgLsjWfjy/Listeners","SHELL":"/opt/homebrew/bin/bash","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/druths/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.2/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/druths/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.2/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-20d733b78ea51696132aebf43512baf5ad2982c1.sock"}
[02:01:45.781] Spawned 3663
[02:01:45.844] > local-server-1> Running ssh connection command: "-v -T -D 51920 -o ConnectTimeout=15 titanforge"
[02:01:45.845] > local-server-1> Spawned ssh, pid=3672
[02:01:45.848] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6
[02:01:46.892] stderr> debug1: Server host key: ssh-ed25519 SHA256:n5DXoq91CRDaSi1HMnHzejVjxogPyktsu/uxe9xUgwI
[02:01:48.068] stderr> Authenticated to titanforge.heypetro.com ([44.230.94.112]:22) using "publickey".
[02:01:49.562] > Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.15.0-1033-aws x86_64)
[02:01:50.377] Remote server is listening on port 33667
[02:01:50.377] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":33667},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/1001","platform":"linux","connectionToken":"1a111aa1-111a-1a11-11aa-1aa1a111111a"},"installUnpackCode":""}
[02:01:50.379] Persisting server connection details to /Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json
[02:01:50.385] Starting forwarding server. local port 51932 -> socksPort 51920 -> remotePort 33667
[02:01:50.385] Forwarding server listening on port 51932
[02:01:50.386] Waiting for ssh tunnel to be ready
[02:01:50.388] [Forwarding server port 51932] Got connection 0
[02:01:50.390] Tunneled port 33667 to local port 51932
[02:01:50.390] Resolved "ssh-remote+titanforge" to "port 51932"
[02:01:50.405] ------
[02:01:50.416] [Forwarding server port 51932] Got connection 1
[02:01:50.701] [Forwarding server port 51932] Got connection 2
[02:01:51.967] [Forwarding server port 51932] Got connection 3
[02:01:54.454] Opening exec server for ssh-remote+titanforge
[02:01:54.468] Acquiring local install lock: /var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-remote-ssh-d858046c-install.lock
[02:01:54.469] Initizing new exec server for ssh-remote+titanforge
[02:01:54.480] Looking for existing server data file at /Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json
[02:01:54.490] Found local server running: {"remoteListeningOn":{"port":33667},"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/1001","platform":"linux","connectionToken":"1a111aa1-111a-1a11-11aa-1aa1a111111a","pid":3663,"ipcHandlePath":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-15dad3dfbae36bb8608fc55880baa4db85c0ee8d.sock","socksPort":51920,"startupTime":1694325705781}
[02:01:54.490] Running server is stale. Ignoring
[02:01:54.490] Using commit id "8b617bd08fd9e3fc94d14adb8d358b56e3f72314" and quality "stable" for server
[02:01:54.492] Install and start server if needed
[02:01:54.496] askpass server listening on /var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-2b8d61b4287fb72a8376bed6c192561a342cf31f.sock
[02:01:54.497] Spawning local server with {"serverId":2,"ipcHandlePath":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-946641cc9c2fdb82515c5869c4a8b2a063bb17a4.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","51920","-o","ConnectTimeout=15","titanforge"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json"}
[02:01:54.497] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.qBgLsjWfjy/Listeners","SHELL":"/opt/homebrew/bin/bash","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/druths/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.2/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/druths/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.2/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-2b8d61b4287fb72a8376bed6c192561a342cf31f.sock"}
[02:01:54.497] Spawned 3683
[02:01:54.564] > local-server-2> Running ssh connection command: "-v -T -D 51920 -o ConnectTimeout=15 titanforge"
[02:01:54.566] > local-server-2> Spawned ssh, pid=3692
[02:01:54.568] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6
[02:01:55.182] stderr> debug1: Server host key: ssh-ed25519 SHA256:n5DXoq91CRDaSi1HMnHzejVjxogPyktsu/uxe9xUgwI
[02:01:56.011] stderr> Authenticated to titanforge.heypetro.com ([44.230.94.112]:22) using "publickey".
[02:01:56.012] stderr> bind [::1]:51920: Address already in use
[02:01:56.013] stderr> bind [127.0.0.1]:51920: Address already in use
[02:01:56.013] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 51920
[02:01:56.013] stderr> Could not request local forwarding.
[02:01:57.085] [Forwarding server port 51932] Got connection 4
[02:01:57.085] [Forwarding server port 51932] Got connection 5
[02:01:57.086] [Forwarding server port 51932] Got connection 6
[02:01:57.090] [Forwarding server port 51932] Got connection 7
[02:01:57.090] [Forwarding server port 51932] Got connection 8
[02:01:58.169] > Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.15.0-1033-aws x86_64)
[02:01:59.122] Remote server is listening on port 43593
[02:01:59.122] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":43593},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1001","platform":"linux"},"serverStartTime":135,"installUnpackCode":""}
[02:01:59.123] Persisting server connection details to /Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json
[02:01:59.124] Starting forwarding server. local port 51961 -> socksPort 51920 -> remotePort 43593
[02:01:59.125] Forwarding server listening on port 51961
[02:01:59.125] Waiting for ssh tunnel to be ready
[02:01:59.126] Tunneled port 43593 to local port 51961
[02:01:59.126] Resolved "ssh-remote+titanforge" to "port 51961"
[02:01:59.126] Resolving exec server at port 51961
[02:01:59.127] [Forwarding server port 51961] Got connection 0
[02:01:59.127] [Forwarding server port 51961] Got connection 1
[02:01:59.306] > local-server-1> Timed out
[02:01:59.308] Local server exit: 0
[02:01:59.308] Exec server for ssh-remote+titanforge failed: Error: Connection closed
[02:01:59.309] Error opening exec server for ssh-remote+titanforge: Error: Connection closed
[02:01:59.309] ------
[02:01:59.309] SSH Resolver called for "ssh-remote+titanforge", attempt 2, (Reconnection)
[02:01:59.310] SSH Resolver called for host: titanforge
[02:01:59.310] Setting up SSH remote "titanforge"
[02:01:59.311] Acquiring local install lock: /var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-remote-ssh-d858046c-install.lock
[02:01:59.311] Looking for existing server data file at /Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json
[02:01:59.311] Found local server running: {"remoteListeningOn":{"port":43593},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1001","platform":"linux","pid":3683,"ipcHandlePath":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-946641cc9c2fdb82515c5869c4a8b2a063bb17a4.sock","socksPort":51920,"startupTime":1694325714497}
[02:01:59.311] Running server is stale. Ignoring
[02:01:59.312] Using commit id "8b617bd08fd9e3fc94d14adb8d358b56e3f72314" and quality "stable" for server
[02:01:59.313] Install and start server if needed
[02:01:59.315] askpass server listening on /var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-9b4fa994670484c116508ad40fe9fd2a85c0c60a.sock
[02:01:59.315] Spawning local server with {"serverId":3,"ipcHandlePath":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-aa4e932d5eb59cb4ec1420dd43b14062c6eafbb2.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","51920","-o","ConnectTimeout=15","titanforge"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json"}
[02:01:59.315] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.qBgLsjWfjy/Listeners","SHELL":"/opt/homebrew/bin/bash","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/druths/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.2/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/druths/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.2/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/7y/q2kk48rj17v5bt006bkn6lrw0000gn/T/vscode-ssh-askpass-9b4fa994670484c116508ad40fe9fd2a85c0c60a.sock"}
[02:01:59.316] Spawned 3693
[02:01:59.387] > local-server-3> Running ssh connection command: "-v -T -D 51920 -o ConnectTimeout=15 titanforge"
[02:01:59.388] > local-server-3> Spawned ssh, pid=3702
[02:01:59.391] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6
[02:02:00.408] stderr> debug1: Server host key: ssh-ed25519 SHA256:n5DXoq91CRDaSi1HMnHzejVjxogPyktsu/uxe9xUgwI
[02:02:02.712] stderr> Authenticated to titanforge.heypetro.com ([44.230.94.112]:22) using "publickey".
[02:02:03.526] > Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.15.0-1033-aws x86_64)
[02:02:05.157] Remote server is listening on port 39305
[02:02:05.158] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":39305},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1001","platform":"linux"},"serverStartTime":98,"installUnpackCode":""}
[02:02:05.159] Persisting server connection details to /Users/druths/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d858046c-8b617bd08fd9e3fc94d14adb8d358b56e3f72314-0.106.2/data.json
[02:02:05.162] Starting forwarding server. local port 51967 -> socksPort 51920 -> remotePort 39305
[02:02:05.162] Forwarding server listening on port 51967
[02:02:05.163] Waiting for ssh tunnel to be ready
[02:02:05.169] Tunneled port 39305 to local port 51967
[02:02:05.169] Resolved "ssh-remote+titanforge" to "port 51967"
[02:02:05.169] Initizing new exec server for ssh-remote+titanforge
[02:02:05.169] Resolving exec server at port 51967
[02:02:05.170] [Forwarding server port 51967] Got connection 0
[02:02:05.171] [Forwarding server port 51967] Got connection 1
[02:02:05.749] Exec server for ssh-remote+titanforge created and cached
[02:02:05.754] ------
[02:02:06.070] [server] Checking /home/druths/.vscode-server/cli/servers/Stable-8b617bd08fd9e3fc94d14adb8d358b56e3f72314/log.txt and /home/druths/.vscode-server/cli/servers/Stable-8b617bd08fd9e3fc94d14adb8d358b56e3f72314/pid.txt for a running server...
[02:02:06.070] [server] Found running server (pid=3372124)
Anything else?
No response
The text was updated successfully, but these errors were encountered: