Skip to content
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

Closed
3 tasks done
druths opened this issue Sep 10, 2023 · 12 comments
Closed
3 tasks done
Assignees
Labels
ssh Issue in vscode-remote SSH

Comments

@druths
Copy link

druths commented Sep 10, 2023

Is there an existing issue for this bug?

  • I have searched the existing issues

Required Troubleshooting Steps

  • I have followed these troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting

Connect 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

  1. On a Mac M2 running 13.5.2
  2. With a remote workspace sitting on an Ubuntu 20.04 machine
  3. Try to open the remote workspace
  4. The VS Code Server initialization will start, but consistently fail and throw up the "Cannot reconnect" dialog. I select "Reload window", and the same thing happens over and over.

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)

System information as of Sun Sep 10 06:01:48 UTC 2023

System load: 6.69
Usage of /: 50.6% of 968.99GB
Memory usage: 36%
Swap usage: 0%
Processes: 376
Users logged in: 1
IPv4 address for br-1a5486afd7a2: 172.20.0.1
IPv4 address for cni0: 10.1.81.1
IPv4 address for docker0: 172.17.0.1
IPv4 address for ens5: 10.9.144.170

=> There are 15 zombie processes.

  • Ubuntu Pro delivers the most comprehensive open source security and
    compliance features.

    https://ubuntu.com/aws/pro

  • Introducing Expanded Security Maintenance for Applications.
    Receive updates to over 25,000 software packages with your
    Ubuntu Pro subscription. Free for personal use.

    https://ubuntu.com/aws/pro

Expanded Security Maintenance for Applications is not enabled.

64 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status

New release '22.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

*** System restart required ***
[02:01:49.572] stderr> /home/druths/.bash_profile: line 5: sysconfig_update: command not found
[02:01:49.691] > ready: cd7afbd78050
[02:01:49.822] > Linux 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023
[02:01:49.823] Platform: linux
[02:01:49.955] > /bin/bash
[02:01:49.956] Shell: bash
[02:01:49.957] Creating bash subshell inside "bash"
[02:01:50.102] > bash version: 5.0.17(1)-release
[02:01:50.139] > bash version: 5.0.17(1)-release
[02:01:50.225] > bash version: 5.0.17(1)-release
[02:01:50.253] > cd7afbd78050: running
[02:01:50.284] > Acquiring lock on /home/druths/.vscode-server/bin/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/vscode-remote-lock.druths.8b617bd08fd9e3fc94d14adb8d358b56e3f72314
[02:01:50.287] > Found existing installation at /home/druths/.vscode-server/bin/8b617bd08fd9e3fc94d14adb8d358b56e3f72314...
Checking /home/druths/.vscode-server/.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.log and /home/druths/.vscode-server/.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.pid for a running server
Looking for server with pid: 3377135
[02:01:50.319] > Found running server...
[02:01:50.320] >
*

Checking server status on port 33667 with wget
cd7afbd78050: start
SSH_AUTH_SOCK====
DISPLAY====
webUiAccessToken====
listeningOn==33667==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
connectionToken==1a111aa1-111a-1a11-11aa-1aa1a111111a==
cd7afbd78050: end
[02:01:50.376] Received install output:
SSH_AUTH_SOCK====
DISPLAY====
webUiAccessToken====
listeningOn==33667==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====
connectionToken==1a111aa1-111a-1a11-11aa-1aa1a111111a==

[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)

System information as of Sun Sep 10 06:01:56 UTC 2023

System load: 7.59
Usage of /: 50.6% of 968.99GB
Memory usage: 36%
Swap usage: 0%
Processes: 387
Users logged in: 1
IPv4 address for br-1a5486afd7a2: 172.20.0.1
IPv4 address for cni0: 10.1.81.1
IPv4 address for docker0: 172.17.0.1
IPv4 address for ens5: 10.9.144.170

=> There are 15 zombie processes.

  • Ubuntu Pro delivers the most comprehensive open source security and
    compliance features.

    https://ubuntu.com/aws/pro

  • Introducing Expanded Security Maintenance for Applications.
    Receive updates to over 25,000 software packages with your
    Ubuntu Pro subscription. Free for personal use.

    https://ubuntu.com/aws/pro

Expanded Security Maintenance for Applications is not enabled.

64 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status

New release '22.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

*** System restart required ***
[02:01:58.200] stderr> /home/druths/.bash_profile: line 5: sysconfig_update: command not found
[02:01:58.286] > ready: 2a3371297a93
[02:01:58.434] > Linux 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023
[02:01:58.434] Platform: linux
[02:01:58.559] > /bin/bash
[02:01:58.560] Shell: bash
[02:01:58.560] Creating bash subshell inside "bash"
[02:01:58.700] > bash version: 5.0.17(1)-release
[02:01:58.772] > bash version: 5.0.17(1)-release
[02:01:58.826] > bash version: 5.0.17(1)-release
[02:01:58.861] > 2a3371297a93: running
[02:01:58.941] > Found existing installation at /home/druths/.vscode-server...
Running ssh connection command... /home/druths/.vscode-server/code-8b617bd08fd9e3fc94d14adb8d358b56e3f72314 command-shell --cli-data-dir /home/druths/.vscode-server/cli --on-port --require-token 5720a3f8c4c9 &> "/home/druths/.vscode-server/.cli.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.log" < /dev/null
printenv:
[02:01:58.948] > SHELL=/bin/bash
PWD=/home/druths
LOGNAME=druths
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/druths
LANG=C.UTF-8
VSCODE_AGENT_FOLDER=/home/druths/.vscode-server
SSH_CONNECTION=131.226.43.32 51945 10.9.144.170 22
XDG_SESSION_CLASS=user
USER=druths
SHLVL=1
XDG_SESSION_ID=7546
XDG_RUNTIME_DIR=/run/user/1001
SSH_CLIENT=131.226.43.32 51945 22
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/druths/.dotnet/tools
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
_=/usr/bin/printenv
[02:01:58.981] > Removing old logfile at /home/druths/.vscode-server/.cli.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.log
[02:01:58.998] > Spawned remote CLI: 3478589
[02:01:59.037] > Waiting for server log...
[02:01:59.121] > 2a3371297a93: start
SSH_AUTH_SOCK====
DISPLAY====
listeningOn==127.0.0.1:43593==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==135==
2a3371297a93: end
[02:01:59.122] Received install output:
SSH_AUTH_SOCK====
DISPLAY====
listeningOn==127.0.0.1:43593==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==135==

[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)

System information disabled due to load higher than 8.0

  • Ubuntu Pro delivers the most comprehensive open source security and
    compliance features.

    https://ubuntu.com/aws/pro

  • Introducing Expanded Security Maintenance for Applications.
    Receive updates to over 25,000 software packages with your
    Ubuntu Pro subscription. Free for personal use.

    https://ubuntu.com/aws/pro

Expanded Security Maintenance for Applications is not enabled.

64 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status

New release '22.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

*** System restart required ***
[02:02:03.530] stderr> /home/druths/.bash_profile: line 5: sysconfig_update: command not found
[02:02:03.660] > ready: ce1c95ce989f
[02:02:04.016] > local-server-2> Timed out
[02:02:04.020] > Linux 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023
[02:02:04.020] Platform: linux
[02:02:04.021] Local server exit: 0
[02:02:04.591] > /bin/bash
[02:02:04.592] Shell: bash
[02:02:04.592] Creating bash subshell inside "bash"
[02:02:04.774] > bash version: 5.0.17(1)-release
[02:02:04.816] > bash version: 5.0.17(1)-release
[02:02:04.895] > bash version: 5.0.17(1)-release
[02:02:04.900] > bash version: 5.0.17(1)-release
[02:02:05.039] > ce1c95ce989f: running
Found existing installation at /home/druths/.vscode-server...
Running ssh connection command... /home/druths/.vscode-server/code-8b617bd08fd9e3fc94d14adb8d358b56e3f72314 command-shell --cli-data-dir /home/druths/.vscode-server/cli --on-port --require-token ab5a9ca1956e &> "/home/druths/.vscode-server/.cli.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.log" < /dev/null
printenv:
SHELL=/bin/bash
PWD=/home/druths
LOGNAME=druths
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/druths
LANG=C.UTF-8
VSCODE_AGENT_FOLDER=/home/druths/.vscode-server
SSH_CONNECTION=131.226.43.32 51966 10.9.144.170 22
XDG_SESSION_CLASS=user
USER=druths
SHLVL=1
XDG_SESSION_ID=7547
XDG_RUNTIME_DIR=/run/user/1001
SSH_CLIENT=131.226.43.32 51966 22
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/druths/.dotnet/tools
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus
_=/usr/bin/printenv
[02:02:05.043] > Removing old logfile at /home/druths/.vscode-server/.cli.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.log
Spawned remote CLI: 3478863
[02:02:05.051] > Waiting for server log...
[02:02:05.100] > Waiting for server log...
[02:02:05.157] > ce1c95ce989f: start
SSH_AUTH_SOCK====
DISPLAY====
listeningOn==127.0.0.1:39305==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==98==
ce1c95ce989f: end
[02:02:05.157] Received install output:
SSH_AUTH_SOCK====
DISPLAY====
listeningOn==127.0.0.1:39305==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1001==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==98==

[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

@druths druths added the ssh Issue in vscode-remote SSH label Sep 10, 2023
@druths
Copy link
Author

druths commented Sep 10, 2023

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.

@wchaws
Copy link

wchaws commented Sep 10, 2023

The same issue.

@Messjer
Copy link

Messjer commented Sep 10, 2023

I am experiencing the same issue after updating to the latest version.

@bellerofonte
Copy link

bellerofonte commented Sep 10, 2023

+1 same issue
works ~well after roll bask to Remote - SSH v105.1

@xgdgsc
Copy link

xgdgsc commented Sep 10, 2023

Same on macOS.

@kia-master
Copy link

+1, can confirm the same issue on a Mac M2. Rolling back to Remote - SSH v0.105.1 solved it for me.

@roblourens
Copy link
Member

Try disabling the remote.SSH.useExecServer setting, or downgrading the extension. Sorry for the trouble

@slumtrimpet
Copy link

It seems that switching to the pre-release v0.107.2023090815 build also seems to fix this.

@Alexadar
Copy link

How to install pre-release v0.107.2023090815 build on mac? thanks

@connor4312
Copy link
Member

0.106.3 was just released with the fix

@connor4312
Copy link
Member

@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?

@druths
Copy link
Author

druths commented Sep 12, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

10 participants