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]: Forwarded ports stop working on reconnect #10568

Open
2 of 3 tasks
TheAlan404 opened this issue Dec 16, 2024 · 0 comments
Open
2 of 3 tasks

[Remote-SSH Bug]: Forwarded ports stop working on reconnect #10568

TheAlan404 opened this issue Dec 16, 2024 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH

Comments

@TheAlan404
Copy link

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 (more info here)

Connect Locally

It connects successfully

->

No response

Expected Behavior

Port forwarding to work normally

Steps To Reproduce

  1. Connect to a remote using ssh
  2. Either manually port forward or use something that causes vscode to forward ports
  3. Wait for a reconnection (due to network interruption, or any other cause - i dont think it is relevant)
  4. When the remote connection is restored, forwarded ports no longer work correctly until the user removes and re-adds/forwards them. The connection to localhost on the user's machine will hang and not resolve until the ports are forwarded manually again

Remote-SSH Log

Remote-SSH Log

[15:30:02.618] Log Level: 2
[15:30:02.798] SSH Resolver called for "ssh-remote+localhost", attempt 1
[15:30:02.840] remote.SSH.useLocalServer = false
[15:30:02.842] remote.SSH.useExecServer = true
[15:30:02.842] remote.SSH.showLoginTerminal = true
[15:30:02.842] remote.SSH.remotePlatform = {"193.53.40.49":"linux","localhost":"linux"}
[15:30:02.843] remote.SSH.path = undefined
[15:30:02.843] remote.SSH.configFile = undefined
[15:30:02.845] remote.SSH.useFlock = true
[15:30:02.846] remote.SSH.lockfilesInTmp = false
[15:30:02.847] remote.SSH.localServerDownload = auto
[15:30:02.847] remote.SSH.remoteServerListenOnSocket = false
[15:30:02.847] remote.SSH.defaultExtensions = []
[15:30:02.848] remote.SSH.loglevel = 2
[15:30:02.848] remote.SSH.enableDynamicForwarding = true
[15:30:02.848] remote.SSH.enableRemoteCommand = false
[15:30:02.881] remote.SSH.serverPickPortsFromRange = {}
[15:30:02.882] remote.SSH.serverInstallPath = {}
[15:30:02.882] remote.SSH.permitPtyAllocation = false
[15:30:02.882] remote.SSH.preferredLocalPortRange = undefined
[15:30:02.883] remote.SSH.useCurlAndWgetConfigurationFiles = false
[15:30:02.883] remote.SSH.experimental.chat = false
[15:30:02.883] remote.SSH.experimental.enhancedSessionLogs = false
[15:30:03.082] VS Code version: 1.96.0
[15:30:03.083] Remote-SSH version: [email protected]
[15:30:03.083] win32 x64
[15:30:03.112] SSH Resolver called for host: localhost
[15:30:03.112] Setting up SSH remote "localhost"
[15:30:03.212] Using commit id "138f619c86f1199955d53b4166bef66ef252935c" and quality "stable" for server
[15:30:03.259] Script variables:
 {
  "ExitCode.0": "OK",
  "ExitCode.64": "LinuxPrereqs",
  "ExitCode.65": "ProxyAuthenticationRequired",
  "ExitCode.128": "UnparsableOutput",
  "ExitCode.129": "EmptyOutput",
  "ExitCode.131": "UnhandledResolverExitCode",
  "ExitCode.132": "OfflineError",
  "ExitCode.133": "SshInstall",
  "ExitCode.134": "FindLocalPort",
  "ExitCode.135": "Timeout",
  "ExitCode.136": "ExhaustedRetries",
  "ExitCode.137": "PermissionDenied",
  "ExitCode.138": "MitmPortForwardingDisabled",
  "ExitCode.139": "Canceled",
  "ExitCode.140": "BadLocalDownloadRequest",
  "ExitCode.141": "LocalDownloadFailed",
  "ExitCode.142": "LocalLockTimeout",
  "ExitCode.143": "NoBash",
  "ExitCode.144": "InvalidHostName",
  "ExitCode.145": "BadInstallScriptResult",
  "ExitCode.146": "ShellRequestFailedOnChannel",
  "ExitCode.147": "InvalidPortRange",
  "ExitCode.148": "SendDisconnectBrokenPipe",
  "ExitCode.149": "LocalServerCrashed",
  "ExitCode.150": "NoFreePortInRange",
  "ExitCode.151": "InvalidCustomServerPath",
  "ExitCode.192": "AlreadyInProgress",
  "ExitCode.193": "ServerDownloadFailed",
  "ExitCode.194": "NoDownloaderAvailable",
  "ExitCode.195": "NoDownloaderAvailableForStatusCheck",
  "ExitCode.196": "UnsupportedArch",
  "ExitCode.197": "StatusCheckFailed",
  "ExitCode.198": "NeedInsidersArch",
  "ExitCode.199": "ServerTransferFailed",
  "ExitCode.200": "ServerFailedToStart",
  "ExitCode.201": "NeedInsidersWindows",
  "ExitCode.202": "CreateInstallDirFailed",
  "ExitCode.203": "UnsupportedPlatform",
  "ExitCode.204": "ServerTerminatedCVE20201416",
  "ExitCode.205": "UnpackFailed",
  "ExitCode.206": "ChangeDirFailed",
  "ExitCode.1023": "UnclassifiedError",
  "ExitCode.OK": "0",
  "ExitCode.LinuxPrereqs": "64",
  "ExitCode.ProxyAuthenticationRequired": "65",
  "ExitCode.UnparsableOutput": "128",
  "ExitCode.EmptyOutput": "129",
  "ExitCode.UnhandledResolverExitCode": "131",
  "ExitCode.OfflineError": "132",
  "ExitCode.SshInstall": "133",
  "ExitCode.FindLocalPort": "134",
  "ExitCode.Timeout": "135",
  "ExitCode.ExhaustedRetries": "136",
  "ExitCode.PermissionDenied": "137",
  "ExitCode.MitmPortForwardingDisabled": "138",
  "ExitCode.Canceled": "139",
  "ExitCode.BadLocalDownloadRequest": "140",
  "ExitCode.LocalDownloadFailed": "141",
  "ExitCode.LocalLockTimeout": "142",
  "ExitCode.NoBash": "143",
  "ExitCode.InvalidHostName": "144",
  "ExitCode.BadInstallScriptResult": "145",
  "ExitCode.ShellRequestFailedOnChannel": "146",
  "ExitCode.InvalidPortRange": "147",
  "ExitCode.SendDisconnectBrokenPipe": "148",
  "ExitCode.LocalServerCrashed": "149",
  "ExitCode.NoFreePortInRange": "150",
  "ExitCode.InvalidCustomServerPath": "151",
  "ExitCode.AlreadyInProgress": "192",
  "ExitCode.ServerDownloadFailed": "193",
  "ExitCode.NoDownloaderAvailable": "194",
  "ExitCode.NoDownloaderAvailableForStatusCheck": "195",
  "ExitCode.UnsupportedArch": "196",
  "ExitCode.StatusCheckFailed": "197",
  "ExitCode.NeedInsidersArch": "198",
  "ExitCode.ServerTransferFailed": "199",
  "ExitCode.ServerFailedToStart": "200",
  "ExitCode.NeedInsidersWindows": "201",
  "ExitCode.CreateInstallDirFailed": "202",
  "ExitCode.UnsupportedPlatform": "203",
  "ExitCode.ServerTerminatedCVE20201416": "204",
  "ExitCode.UnpackFailed": "205",
  "ExitCode.ChangeDirFailed": "206",
  "ExitCode.UnclassifiedError": "1023",
  "InstallUnpackCode.Success": "success",
  "InstallUnpackCode.Error": "error",
  "InstallUnpackCode.MissingFiles": "missingFiles",
  "uuid": "5ff709005f08",
  "startMarker": "5ff709005f08: running",
  "commitId": "138f619c86f1199955d53b4166bef66ef252935c",
  "quality": "stable",
  "token": "1111aaaa-11a1-111a-a11a-1a1111111aaa",
  "vscodeAgentFolder": "$HOME/.vscode-server",
  "allowClientDownload": "1",
  "forceClientDownload": "0",
  "cliNameInArchive": "code",
  "ignoreWgetConfigFlag": " --no-config ",
  "ignoreCurlConfigFlag": " --disable ",
  "wgetTriesSegment": "--tries=1",
  "listenArgs": "--on-host=127.0.0.1 --on-port",
  "getDownloadServerStartTrigger": "5ff709005f08:trigger_server_download",
  "getDownloadServerEndTrigger": "5ff709005f08:trigger_server_download_end",
  "getProgressDownloading": "5ff709005f08%%1%%",
  "getProgressInstalling": "5ff709005f08%%2%%",
  "printVars": "echo \"SSH_AUTH_SOCK==$SSH_AUTH_SOCK==\"\necho \"DISPLAY==$DISPLAY==\""
}
[15:30:03.270] Install and start server if needed
[15:30:03.295] Checking ssh with "C:\Program Files\Microsoft\jdk-21.0.3.9-hotspot\bin\ssh.exe -V"
[15:30:03.324] Got error from ssh: spawn C:\Program Files\Microsoft\jdk-21.0.3.9-hotspot\bin\ssh.exe ENOENT
[15:30:03.325] Checking ssh with "C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin\ssh.exe -V"
[15:30:03.329] Got error from ssh: spawn C:\Program Files\Eclipse Adoptium\jdk-17.0.6.10-hotspot\bin\ssh.exe ENOENT
[15:30:03.330] Checking ssh with "C:\Program Files\Microsoft\jdk-11.0.19.7-hotspot\bin\ssh.exe -V"
[15:30:03.334] Got error from ssh: spawn C:\Program Files\Microsoft\jdk-11.0.19.7-hotspot\bin\ssh.exe ENOENT
[15:30:03.335] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe -V"
[15:30:03.339] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[15:30:03.340] Checking ssh with "C:\Windows\system32\ssh.exe -V"
[15:30:03.344] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT
[15:30:03.345] Checking ssh with "C:\Windows\ssh.exe -V"
[15:30:03.350] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT
[15:30:03.351] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"
[15:30:03.355] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT
[15:30:03.355] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[15:30:03.359] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[15:30:03.360] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[15:30:03.589] > O
[15:30:03.591] > penSSH_for_Windows_8.1p1, 
[15:30:03.591] > LibreSSL 
[15:30:03.597] > 3.0.2

[15:30:03.619] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 50197 localhost sh
[15:30:03.623] Generated SSH command: 'type "C:\Users\dennis\AppData\Local\Temp\vscode-linux-multi-line-command-localhost-315963607.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 50197 localhost sh'
[15:30:03.646] Using connect timeout of 17 seconds
[15:30:03.649] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[15:30:07.517] > 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
[15:30:07.522] Got some output, clearing connection timeout
[15:30:11.702] > 5ff709005f08: running
> Script executing under PID: 36137
> Found existing installation at /home/dennis/.vscode-server...
> Starting VS Code CLI...
> printenv:
>     USER=dennis
>     SSH_CLIENT=127.0.0.1 41704 22
>     XDG_SESSION_TYPE=tty
>     SHLVL=0
>     MOTD_SHOWN=pam
>     HOME=/home/dennis
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus    
>     LOGNAME=dennis
>     _=/usr/bin/sh
>     XDG_SESSION_CLASS=user
>     XDG_SESSION_ID=110
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
>     XDG_RUNTIME_DIR=/run/user/1000
>     LANG=en_US.UTF-8
>     SHELL=/bin/bash
>     PWD=/home/dennis
>     SSH_CONNECTION=127.0.0.1 41704 127.0.0.1 22
> Removing old logfile at /home/dennis/.vscode-server/.cli.138f619c86f1199955d53b4166bef66ef252935c.log
[15:30:11.739] > 
> Spawned remote CLI: 36157
> Waiting for server log...
> 5ff709005f08: start
> listeningOn==127.0.0.1:37719==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1000==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==35==
> execServerToken==1111aaaa-11a1-111a-a11a-1a1111111aaa==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 5ff709005f08: end
[15:30:11.740] Received install output: 
listeningOn==127.0.0.1:37719==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==35==
execServerToken==1111aaaa-11a1-111a-a11a-1a1111111aaa==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK====
DISPLAY====

[15:30:11.742] Remote server is listening on port 37719
[15:30:11.743] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":37719},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1000","platform":"linux","execServerToken":"1111aaaa-11a1-111a-a11a-1a1111111aaa"},"serverStartTime":35,"installUnpackCode":""}
[15:30:11.758] > 
[15:30:11.772] Starting forwarding server. local port 50205 -> socksPort 50197 -> remotePort 37719
[15:30:11.775] Forwarding server listening on port 50205
[15:30:11.777] Waiting for ssh tunnel to be ready
[15:30:11.788] [Forwarding server port 50205] Got connection 0
[15:30:11.795] Tunneled port 37719 to local port 50205
[15:30:11.796] Resolved "ssh-remote+localhost" to "port 50205"
[15:30:11.858] Initizing new exec server for ssh-remote+localhost
[15:30:11.858] Resolving exec server at port 50205
[15:30:11.906] [Forwarding server port 50205] Got connection 1
[15:30:12.287] Exec server for ssh-remote+localhost created and cached
[15:30:12.313] ------




[15:30:12.314] No hints found in the recent session.
[15:30:12.499] [server] Checking /home/dennis/.vscode-server/cli/servers/Stable-138f619c86f1199955d53b4166bef66ef252935c/log.txt and /home/dennis/.vscode-server/cli/servers/Stable-138f619c86f1199955d53b4166bef66ef252935c/pid.txt for a running server...
[15:30:12.500] [server] Installing and setting up Visual Studio Code Server...
[15:30:12.502] [server] Server setup complete
[15:30:12.504] [server] Starting server...
[15:30:12.505] [server] Starting server with command... Command { std: "/home/dennis/.vscode-server/cli/servers/Stable-138f619c86f1199955d53b4166bef66ef252935c/server/bin/code-server" "--connection-token=remotessh" "--accept-server-license-terms" "--start-server" "--enable-remote-auto-shutdown" "--socket-path=/tmp/code-5a4f4b08-517a-4fa4-989e-b78bbc125c5c", kill_on_drop: false }
[15:30:12.557] [server] *
[15:30:12.558] [server] * Visual Studio Code Server
[15:30:12.558] [server] *
[15:30:12.558] [server] * By using the software, you agree to
[15:30:12.559] [server] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
[15:30:12.559] [server] * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
[15:30:12.560] [server] *
[15:30:12.560] [server] Server bound to /tmp/code-5a4f4b08-517a-4fa4-989e-b78bbc125c5c
[15:30:12.560] [server] Extension host agent listening on /tmp/code-5a4f4b08-517a-4fa4-989e-b78bbc125c5c
[15:30:12.561] [server] parsed location: "/tmp/code-5a4f4b08-517a-4fa4-989e-b78bbc125c5c"
[15:30:12.561] [server] 
[15:30:12.562] [server] Server started
[15:30:12.583] [server] [12:30:12] 
[15:30:12.585] [server] 
[15:30:12.585] [server] 
[15:30:12.586] [server] 
[15:30:12.598] [server] [12:30:12] Extension host agent started.
[15:30:12.627] [server] [12:30:12] Deleted uninstalled extension from disk rust-lang.rust-analyzer /home/dennis/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2212-linux-x64
[15:30:13.178] [server] [12:30:13] [<unknown>][74de5375][ExtensionHostConnection] New connection established.
[15:30:13.178] [server] [12:30:13] [<unknown>][e64e3e69][ManagementConnection] New connection established.
[15:30:13.335] [server] [12:30:13] [<unknown>][74de5375][ExtensionHostConnection] <36446> Launched Extension Host Process.
[15:30:17.108] Opening exec server for ssh-remote+localhost
[15:30:19.770] Verified and reusing cached exec server for ssh-remote+localhost
[15:30:19.774] No hints found in the recent session.
[15:30:23.347] > bitness==64==
> tmpDir==/run/user/1000==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==35==
> execServerToken==1111aaaa-11a1-111a-a11a-1a1111111aaa==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 5ff709005f08: end
> bitness==64==
> tmpDir==/run/user/1000==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==35==
> execServerToken==2144beea-82c2-478c-b49b-6a8826940cff==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 5ff709005f08: end
[15:30:42.509] > platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==35==
> execServerToken==1111aaaa-11a1-111a-a11a-1a1111111aaa==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 5ff709005f08: end
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==35==
> execServerToken==2144beea-82c2-478c-b49b-6a8826940cff==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 5ff709005f08: end
> downloadTime====
> installTime====
> serverStartTime==35==
> execServerToken==2144beea-82c2-478c-b49b-6a8826940cff==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 5ff709005f08: end
> installTime====
> serverStartTime==35==
> execServerToken==2144beea-82c2-478c-b49b-6a8826940cff==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 5ff709005f08: end
[15:35:12.592] [server] New EH opened, aborting shutdown
[15:35:12.593] [server] [12:35:12] New EH opened, aborting shutdown
[15:52:12.942] [server] [12:52:12] [File Watcher (node.js)] Watcher shutdown because watched path got deleted
[15:54:00.063] [server] [12:54:00] [File Watcher (node.js)] Watcher shutdown because watched path got deleted
[16:07:15.366] [server] [13:07:15] [File Watcher (node.js)] Watcher shutdown because watched path got deleted
[17:21:01.322] [server] [14:21:01] [File Watcher (node.js)] Watcher shutdown because watched path got deleted
[17:22:06.043] [server] rejected promise not handled within 1 second: Error: connect ECONNREFUSED 127.0.0.1:5173
[17:22:06.045] [server] stack trace: Error: connect ECONNREFUSED 127.0.0.1:5173
[17:22:06.046] [server]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)
[17:22:06.047] [server] [14:22:06] Error: connect ECONNREFUSED 127.0.0.1:5173
[17:22:06.048] [server]     at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16) {
[17:22:06.050] [server]   errno: -111,
[17:22:06.051] [server]   code: 'ECONNREFUSED',
[19:57:18.463] > Connection to localhost closed by remote h
> ost.
[19:57:18.489] > 
[19:57:20.024] "install" terminal command done
[19:57:20.036] Install terminal quit with output: ost.
[19:57:40.617] ------




[19:57:40.618] SSH Resolver called for "ssh-remote+localhost", attempt 2, (Reconnection)
[19:57:41.113] SSH Resolver called for host: localhost
[19:57:41.115] Setting up SSH remote "localhost"
[19:57:41.287] Using commit id "138f619c86f1199955d53b4166bef66ef252935c" and quality "stable" for server
[19:57:41.366] Script variables:
 {
  "ExitCode.0": "OK",
  "ExitCode.64": "LinuxPrereqs",
  "ExitCode.65": "ProxyAuthenticationRequired",
  "ExitCode.128": "UnparsableOutput",
  "ExitCode.129": "EmptyOutput",
  "ExitCode.131": "UnhandledResolverExitCode",
  "ExitCode.132": "OfflineError",
  "ExitCode.133": "SshInstall",
  "ExitCode.134": "FindLocalPort",
  "ExitCode.135": "Timeout",
  "ExitCode.136": "ExhaustedRetries",
  "ExitCode.137": "PermissionDenied",
  "ExitCode.138": "MitmPortForwardingDisabled",
  "ExitCode.139": "Canceled",
  "ExitCode.140": "BadLocalDownloadRequest",
  "ExitCode.141": "LocalDownloadFailed",
  "ExitCode.142": "LocalLockTimeout",
  "ExitCode.143": "NoBash",
  "ExitCode.144": "InvalidHostName",
  "ExitCode.145": "BadInstallScriptResult",
  "ExitCode.146": "ShellRequestFailedOnChannel",
  "ExitCode.147": "InvalidPortRange",
  "ExitCode.148": "SendDisconnectBrokenPipe",
  "ExitCode.149": "LocalServerCrashed",
  "ExitCode.150": "NoFreePortInRange",
  "ExitCode.151": "InvalidCustomServerPath",
  "ExitCode.192": "AlreadyInProgress",
  "ExitCode.193": "ServerDownloadFailed",
  "ExitCode.194": "NoDownloaderAvailable",
  "ExitCode.195": "NoDownloaderAvailableForStatusCheck",
  "ExitCode.196": "UnsupportedArch",
  "ExitCode.197": "StatusCheckFailed",
  "ExitCode.198": "NeedInsidersArch",
  "ExitCode.199": "ServerTransferFailed",
  "ExitCode.200": "ServerFailedToStart",
  "ExitCode.201": "NeedInsidersWindows",
  "ExitCode.202": "CreateInstallDirFailed",
  "ExitCode.203": "UnsupportedPlatform",
  "ExitCode.204": "ServerTerminatedCVE20201416",
  "ExitCode.205": "UnpackFailed",
  "ExitCode.206": "ChangeDirFailed",
  "ExitCode.1023": "UnclassifiedError",
  "ExitCode.OK": "0",
  "ExitCode.LinuxPrereqs": "64",
  "ExitCode.ProxyAuthenticationRequired": "65",
  "ExitCode.UnparsableOutput": "128",
  "ExitCode.EmptyOutput": "129",
  "ExitCode.UnhandledResolverExitCode": "131",
  "ExitCode.OfflineError": "132",
  "ExitCode.SshInstall": "133",
  "ExitCode.FindLocalPort": "134",
  "ExitCode.Timeout": "135",
  "ExitCode.ExhaustedRetries": "136",
  "ExitCode.PermissionDenied": "137",
  "ExitCode.MitmPortForwardingDisabled": "138",
  "ExitCode.Canceled": "139",
  "ExitCode.BadLocalDownloadRequest": "140",
  "ExitCode.LocalDownloadFailed": "141",
  "ExitCode.LocalLockTimeout": "142",
  "ExitCode.NoBash": "143",
  "ExitCode.InvalidHostName": "144",
  "ExitCode.BadInstallScriptResult": "145",
  "ExitCode.ShellRequestFailedOnChannel": "146",
  "ExitCode.InvalidPortRange": "147",
  "ExitCode.SendDisconnectBrokenPipe": "148",
  "ExitCode.LocalServerCrashed": "149",
  "ExitCode.NoFreePortInRange": "150",
  "ExitCode.InvalidCustomServerPath": "151",
  "ExitCode.AlreadyInProgress": "192",
  "ExitCode.ServerDownloadFailed": "193",
  "ExitCode.NoDownloaderAvailable": "194",
  "ExitCode.NoDownloaderAvailableForStatusCheck": "195",
  "ExitCode.UnsupportedArch": "196",
  "ExitCode.StatusCheckFailed": "197",
  "ExitCode.NeedInsidersArch": "198",
  "ExitCode.ServerTransferFailed": "199",
  "ExitCode.ServerFailedToStart": "200",
  "ExitCode.NeedInsidersWindows": "201",
  "ExitCode.CreateInstallDirFailed": "202",
  "ExitCode.UnsupportedPlatform": "203",
  "ExitCode.ServerTerminatedCVE20201416": "204",
  "ExitCode.UnpackFailed": "205",
  "ExitCode.ChangeDirFailed": "206",
  "ExitCode.UnclassifiedError": "1023",
  "InstallUnpackCode.Success": "success",
  "InstallUnpackCode.Error": "error",
  "InstallUnpackCode.MissingFiles": "missingFiles",
  "uuid": "86f4779b9a70",
  "startMarker": "86f4779b9a70: running",
  "commitId": "138f619c86f1199955d53b4166bef66ef252935c",
  "quality": "stable",
  "token": "1a1aa1aa-1111-1aaa-11a1-11a11a1a1aa1",
  "vscodeAgentFolder": "$HOME/.vscode-server",
  "allowClientDownload": "1",
  "forceClientDownload": "0",
  "cliNameInArchive": "code",
  "ignoreWgetConfigFlag": " --no-config ",
  "ignoreCurlConfigFlag": " --disable ",
  "wgetTriesSegment": "--tries=1",
  "listenArgs": "--on-host=127.0.0.1 --on-port",
  "getDownloadServerStartTrigger": "86f4779b9a70:trigger_server_download",
  "getDownloadServerEndTrigger": "86f4779b9a70:trigger_server_download_end",
  "getProgressDownloading": "86f4779b9a70%%1%%",
  "getProgressInstalling": "86f4779b9a70%%2%%",
  "printVars": "echo \"SSH_AUTH_SOCK==$SSH_AUTH_SOCK==\"\necho \"DISPLAY==$DISPLAY==\""
}
[19:57:41.408] Install and start server if needed
[19:57:41.436] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 57327 localhost sh
[19:57:41.449] Generated SSH command: 'type "C:\Users\dennis\AppData\Local\Temp\vscode-linux-multi-line-command-localhost-977988548.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 57327 localhost sh'
[19:57:41.455] Using connect timeout of 17 seconds
[19:57:41.462] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[19:57:43.372] > 
[19:57:43.378] Got some output, clearing connection timeout
[19:57:43.397] > 
> 
> 
> 
> 
> 
> 
[19:57:47.558] > 86f4779b9a70: running
> Script executing under PID: 80129
> Found existing installation at /home/dennis/.vscode-server...
> Starting VS Code CLI...
> printenv:
>     USER=dennis
>     SSH_CLIENT=127.0.0.1 35624 22
>     XDG_SESSION_TYPE=tty
[19:57:47.604] > 
>     SHLVL=0
>     MOTD_SHOWN=pam
>     HOME=/home/dennis
>     DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>     LOGNAME=dennis
>     _=/usr/bin/sh
>     XDG_SESSION_CLASS=user
>     XDG_SESSION_ID=116
>     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
>     XDG_RUNTIME_DIR=/run/user/1000
>     LANG=en_US.UTF-8
>     SHELL=/bin/bash
>     PWD=/home/dennis
>     SSH_CONNECTION=127.0.0.1 35624 127.0.0.1 22
> Removing old logfile at /home/dennis/.vscode-server/.cli.138f619c86f1199955d53b4166bef66ef252935c.log
> Spawned remote CLI: 80149
> Waiting for server log...
[19:57:47.619] > 
> 86f4779b9a70: start
> listeningOn==127.0.0.1:39349==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1000==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==34==
> execServerToken==1a1aa1aa-1111-1aaa-11a1-11a11a1a1aa1==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 86f4779b9a70: end
[19:57:47.621] Received install output: 
listeningOn==127.0.0.1:39349==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==34==
execServerToken==1a1aa1aa-1111-1aaa-11a1-11a11a1a1aa1==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK====
DISPLAY====

[19:57:47.626] Remote server is listening on port 39349
[19:57:47.629] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":39349},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1000","platform":"linux","execServerToken":"1a1aa1aa-1111-1aaa-11a1-11a11a1a1aa1"},"serverStartTime":34,"installUnpackCode":""}
[19:57:47.654] Starting forwarding server. local port 57332 -> socksPort 57327 -> remotePort 39349
[19:57:47.658] Forwarding server listening on port 57332
[19:57:47.659] Waiting for ssh tunnel to be ready
[19:57:47.691] Tunneled port 39349 to local port 57332
[19:57:47.692] Resolved "ssh-remote+localhost" to "port 57332"
[19:57:47.707] [Forwarding server port 57332] Got connection 0
[19:57:50.711] Existing exec server for ssh-remote+localhost timed out
[19:57:50.712] Initizing new exec server for ssh-remote+localhost
[19:57:50.713] Resolving exec server at port 57332
[19:57:50.725] [Forwarding server port 57332] Got connection 1
[19:57:51.242] Exec server for ssh-remote+localhost created and cached
[19:57:51.316] ------




[19:57:51.325] No hints found in the recent session.
[19:57:51.643] [server] Checking /home/dennis/.vscode-server/cli/servers/Stable-138f619c86f1199955d53b4166bef66ef252935c/log.txt and /home/dennis/.vscode-server/cli/servers/Stable-138f619c86f1199955d53b4166bef66ef252935c/pid.txt for a running server...
[19:57:51.646] [server] Found running server (pid=36182)

Anything else?

I am using cloudflared in between the ssh client (vscode) and the ssh server

@TheAlan404 TheAlan404 added the ssh Issue in vscode-remote SSH label Dec 16, 2024
@joshspicer joshspicer added the bug Issue identified by VS Code Team member as probable bug label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants