microsoft / microsoft/vscode-remote-release
Issue when use multiple VS Code instances
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I did not ask the @remote-ssh participant for help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I did not try step 2 of the troubleshooting steps
Remote-SSH Log
Remote-SSH Log
[11:03:57.832] Log Level: 2
[11:03:57.861] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d", attempt 1
[11:03:57.865] remote.SSH.useLocalServer = false
[11:03:57.865] remote.SSH.useExecServer = true
[11:03:57.865] remote.SSH.bindHost = {}
[11:03:57.866] remote.SSH.showLoginTerminal = false
[11:03:57.866] remote.SSH.remotePlatform = {"testPC_36":"linux","testPC_61":"linux","testPC_34":"linux","testPC_49":"linux","testPC_54":"linux","testPC_138":"linux","testPC_95":"linux","testPC_55":"linux","testPC_57":"linux","testPC_59":"linux"}
[11:03:57.866] remote.SSH.path = undefined
[11:03:57.866] remote.SSH.configFile = undefined
[11:03:57.867] remote.SSH.useFlock = true
[11:03:57.867] remote.SSH.lockfilesInTmp = false
[11:03:57.867] remote.SSH.localServerDownload = auto
[11:03:57.867] remote.SSH.remoteServerListenOnSocket = false
[11:03:57.867] remote.SSH.defaultExtensions = []
[11:03:57.868] remote.SSH.defaultExtensionsIfInstalledLocally = []
[11:03:57.868] remote.SSH.loglevel = 2
[11:03:57.868] remote.SSH.enableDynamicForwarding = true
[11:03:57.869] remote.SSH.enableRemoteCommand = false
[11:03:57.869] remote.SSH.serverPickPortsFromRange = {}
[11:03:57.869] remote.SSH.serverInstallPath = {}
[11:03:57.869] remote.SSH.permitPtyAllocation = false
[11:03:57.869] remote.SSH.preferredLocalPortRange = undefined
[11:03:57.869] remote.SSH.useCurlAndWgetConfigurationFiles = false
[11:03:57.870] remote.SSH.experimental.chat = false
[11:03:57.870] remote.SSH.experimental.enhancedSessionLogs = false
[11:03:57.870] remote.SSH.httpProxy = {}
[11:03:57.870] remote.SSH.httpsProxy = {}
[11:03:57.877] VS Code version: 1.103.1
[11:03:57.878] Remote-SSH version: remote-ssh@0.120.0
[11:03:57.878] win32 x64
[11:03:57.900] SSH Resolver called for host: testPC_34
[11:03:57.900] Setting up SSH remote "testPC_34"
[11:03:57.912] Using commit id "360a4e4fd251bfce169a4ddf857c7d25d1ad40da" and quality "stable" for server
[11:03:57.912] Extensions to install:
[11:03:57.919] Install and start server if needed
[11:03:57.924] Checking ssh with "C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\ssh.exe -V"
[11:03:57.927] Got error from ssh: spawn C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin\ssh.exe ENOENT
[11:03:57.928] Checking ssh with "d:\Users\enric\AppData\Local\Programs\cursor\resources\app\bin\ssh.exe -V"
[11:03:57.930] Got error from ssh: spawn d:\Users\enric\AppData\Local\Programs\cursor\resources\app\bin\ssh.exe ENOENT
[11:03:57.930] Checking ssh with "C:\Program Files\Google\Chrome\Application\ssh.exe -V"
[11:03:57.933] Got error from ssh: spawn C:\Program Files\Google\Chrome\Application\ssh.exe ENOENT
[11:03:57.933] Checking ssh with "C:\Program Files\Basler\pylon 8\Runtime\x64\ssh.exe -V"
[11:03:57.935] Got error from ssh: spawn C:\Program Files\Basler\pylon 8\Runtime\x64\ssh.exe ENOENT
[11:03:57.935] Checking ssh with "C:\Program Files\Basler\pylon 8\Runtime\Win32\ssh.exe -V"
[11:03:57.937] Got error from ssh: spawn C:\Program Files\Basler\pylon 8\Runtime\Win32\ssh.exe ENOENT
[11:03:57.937] Checking ssh with "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe -V"
[11:03:57.940] Got error from ssh: spawn C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe ENOENT
[11:03:57.940] Checking ssh with "C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe -V"
[11:03:57.943] Got error from ssh: spawn C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe ENOENT
[11:03:57.943] Checking ssh with "C:\Windows\system32\ssh.exe -V"
[11:03:57.947] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT
[11:03:57.948] Checking ssh with "C:\Windows\ssh.exe -V"
[11:03:57.951] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT
[11:03:57.951] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"
[11:03:57.954] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT
[11:03:57.954] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[11:03:57.956] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[11:03:57.957] Checking ssh with "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL\ssh.exe -V"
[11:03:57.959] Got error from ssh: spawn C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL\ssh.exe ENOENT
[11:03:57.959] Checking ssh with "C:\Program Files\Intel\Intel(R) Management Engine Components\DAL\ssh.exe -V"
[11:03:57.962] Got error from ssh: spawn C:\Program Files\Intel\Intel(R) Management Engine Components\DAL\ssh.exe ENOENT
[11:03:57.962] Checking ssh with "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT\ssh.exe -V"
[11:03:57.967] Got error from ssh: spawn C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT\ssh.exe ENOENT
[11:03:57.967] Checking ssh with "C:\Program Files\Intel\Intel(R) Management Engine Components\IPT\ssh.exe -V"
[11:03:57.970] Got error from ssh: spawn C:\Program Files\Intel\Intel(R) Management Engine Components\IPT\ssh.exe ENOENT
[11:03:57.970] Checking ssh with "C:\Program Files\Intel\WiFi\bin\ssh.exe -V"
[11:03:57.973] Got error from ssh: spawn C:\Program Files\Intel\WiFi\bin\ssh.exe ENOENT
[11:03:57.974] Checking ssh with "C:\Program Files\Common Files\Intel\WirelessCommon\ssh.exe -V"
[11:03:57.977] Got error from ssh: spawn C:\Program Files\Common Files\Intel\WirelessCommon\ssh.exe ENOENT
[11:03:57.977] Checking ssh with "C:\WINDOWS\system32\ssh.exe -V"
[11:03:57.982] Got error from ssh: spawn C:\WINDOWS\system32\ssh.exe ENOENT
[11:03:57.983] Checking ssh with "C:\WINDOWS\ssh.exe -V"
[11:03:57.988] Got error from ssh: spawn C:\WINDOWS\ssh.exe ENOENT
[11:03:57.988] Checking ssh with "C:\WINDOWS\System32\Wbem\ssh.exe -V"
[11:03:57.993] Got error from ssh: spawn C:\WINDOWS\System32\Wbem\ssh.exe ENOENT
[11:03:57.993] Checking ssh with "C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[11:03:57.998] Got error from ssh: spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[11:03:57.998] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[11:03:58.040] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2
[11:03:58.048] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 56397 "testPC_34" sh
[11:03:58.051] Generated SSH command: 'type "C:\Users\enric\AppData\Local\Temp\vscode-linux-multi-line-command-test--_34-584235531.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 56397 "testPC_34" sh'
[11:03:58.053] Using connect timeout of 17 seconds
[11:03:58.055] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[11:03:58.350] >
[11:03:58.351] Got some output, clearing connection timeout
[11:03:58.607] > inventio@192.168.1.34's password:
[11:03:58.607] Showing password prompt
[11:04:03.178] Got password response
[11:04:03.178] "install" wrote data to terminal: "*************"
[11:04:03.201] >
[11:04:03.308] > a1ddc089c2c8: running
> Script executing under PID: 77949
[11:04:03.316] > Found existing installation at /home/inventio/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /home/inventio/.vscode-server/.cli.360a4e4fd251bfce169a4ddf857c7d25d1ad40da.log
> Spawned remote CLI: 77967
> Waiting for server log...
[11:04:03.348] > a1ddc089c2c8: start
> listeningOn==127.0.0.1:45047==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1000==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==36==
> execServerToken==111a1aa1-a11a-11a1-a111-a1aa1111aa1a==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> a1ddc089c2c8: end
[11:04:03.348] Received install output:
listeningOn==127.0.0.1:45047==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1000==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==36==
execServerToken==111a1aa1-a11a-11a1-a111-a1aa1111aa1a==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK====
DISPLAY====
[11:04:03.349] Remote server is listening on port 45047
[11:04:03.349] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":45047},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1000","platform":"linux","execServerToken":"111a1aa1-a11a-11a1-a111-a1aa1111aa1a"},"serverStartTime":36,"installUnpackCode":""}
[11:04:03.357] Starting forwarding server. local port 56407 -> socksPort 56397 -> remotePort 45047
[11:04:03.358] Forwarding server listening on port 56407
[11:04:03.359] Waiting for ssh tunnel to be ready
[11:04:03.361] [Forwarding server port 56407] Got connection 0
[11:04:03.362] Tunneled port 45047 to local port 56407
[11:04:03.362] Resolved "ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d" to "port 56407"
[11:04:03.373] Initizing new exec server for ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d
[11:04:03.373] Resolving exec server at port 56407
[11:04:03.379] [Forwarding server port 56407] Got connection 1
[11:04:03.409] Exec server for ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d created and cached
[11:04:03.409] Extensions to install:
[11:04:03.417] ------
[11:04:03.418] No hints found in the recent session.
[11:04:03.438] [server] Checking /home/inventio/.vscode-server/cli/servers/Stable-360a4e4fd251bfce169a4ddf857c7d25d1ad40da/log.txt and /home/inventio/.vscode-server/cli/servers/Stable-360a4e4fd251bfce169a4ddf857c7d25d1ad40da/pid.txt for a running server...
[11:04:03.477] [server] Found running server (pid=77322)
[11:04:06.399] Opening exec server for ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d
[11:04:06.433] Verified and reusing cached exec server for ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d
[11:04:06.434] No hints found in the recent session.
[11:04:06.439] Opening exec server for ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d
[11:04:06.482] Verified and reusing cached exec server for ssh-remote+7b22686f73744e616d65223a227465737450435f3334227d
[11:04:06.482] No hints found in the recent session.
Expected Behavior
I have a local python application that connect to a local server (i.e. localhost:35000) by requests library that works correctly.
But if I open another instance of VS Code and I connect and debug to a remote server in local network (i.e. 192.168.1.23), I observed that the original instance is not able anymore to connect to local server localhost:35000 (all get/post/put request fails). If I close SSH remote debugger, suddenly the local python application start to work correclty
Actual Behavior
SSH connection debug influences other instance VS code and doesn't allow them to work correclty
Steps To Reproduce
- create a python application that polling a local server ( i.e. a get to localhost:35000/healtcheck using requests)
- open another VS Code instance and start a remote debug on a server in local network (i.e. 192.168.1.23)
- start to debug the first local application, the get fails always
- close the remote ssh, the first application suddenly start to work correctly
Anything else?
In the past I already did that setup and I never had problem, I guess that is a bug in never versions, but I'm not able to find when it happened the first time
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the Remote-SSH log with the local Python application's failed requests while two VS Code instances are open. Reproduce the localhost:35000 failure with the remote connection and test both remote.SSH.useLocalServer values; done means identifying why the SSH debug session affects the other instance and confirming local requests continue working.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, vscode
- Domain
- devtools, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100