Does this issue occur when all extensions are disabled?: N/A
- VS Code Version: 1.116.0
- OS Version: Windows_NT x64 10.0.19045
Steps to Reproduce:
- Start a linux server VM, install dev tools, connect to it with vscode via ssh on 192.168.. address.
- Start a remote tunnel with Github authentication.
The tunnel fails to launch.
Remote Tunnel Service Log
2026-04-16 21:17:52.492 [info] Session updated: trbot86 (github) (service=true)
2026-04-16 21:17:52.493 [info] Session token updated: trbot86 (github)
2026-04-16 21:18:25.234 [info] No other tunnel running
2026-04-16 21:18:25.262 [info] Running tunnel CLI
2026-04-16 21:18:25.262 [info] tunnel Spawning: c:\Program Files\Microsoft VS Code\bin\code-tunnel.exe tunnel --accept-server-license-terms --log info --name DESKTOP-QIMB4F5 --parent-process-id 42816
2026-04-16 21:18:25.278 [info] *
2026-04-16 21:18:25.278 [info] * Visual Studio Code Server
2026-04-16 21:18:25.278 [info] *
2026-04-16 21:18:25.278 [info] * By using the software, you agree to
2026-04-16 21:18:25.278 [info] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
2026-04-16 21:18:25.278 [info] * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
2026-04-16 21:18:25.278 [info] *
2026-04-16 21:18:57.890 [info] [2026-04-16 21:18:57] warn error access singleton, retrying: could not connect to socket/pipe: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }
2026-04-16 21:19:32.500 [info] [2026-04-16 21:19:32] warn error access singleton, retrying: could not connect to socket/pipe: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }
2026-04-16 21:20:05.980 [info] tunnel terminating(60512)
2026-04-16 21:20:05.980 [info] Session reset
2026-04-16 21:20:05.980 [info] Running tunnel CLI
2026-04-16 21:20:05.980 [info] uninstallService Spawning: c:\Program Files\Microsoft VS Code\bin\code-tunnel.exe tunnel service uninstall
2026-04-16 21:20:05.980 [info] Running tunnel CLI
2026-04-16 21:20:05.980 [info] stop Spawning: c:\Program Files\Microsoft VS Code\bin\code-tunnel.exe tunnel kill
2026-04-16 21:20:05.980 [info] tunnel exit(60512): + null
2026-04-16 21:20:05.997 [info] [2026-04-16 21:20:05] info Tunnel service uninstalled
2026-04-16 21:20:38.604 [info] [2026-04-16 21:20:38] warn The tunnel service has been unregistered, but we couldn't find a running tunnel process. You may need to restart or log out and back in to fully stop the tunnel.
2026-04-16 21:20:38.606 [info] uninstallService exit(53660): + 0
2026-04-16 21:20:38.609 [info] [2026-04-16 21:20:38] error could not connect to socket/pipe: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }
2026-04-16 21:20:38.611 [info] stop exit(10228): + 1
2026-04-16 21:25:38.548 [info] Session updated: trbot86 (github) (service=false)
2026-04-16 21:25:38.549 [info] Session token updated: trbot86 (github)
2026-04-16 21:26:11.285 [info] No other tunnel running
2026-04-16 21:26:11.315 [info] Running tunnel CLI
2026-04-16 21:26:11.315 [info] tunnel Spawning: c:\Program Files\Microsoft VS Code\bin\code-tunnel.exe tunnel --accept-server-license-terms --log info --name DESKTOP-QIMB4F5 --parent-process-id 42816
2026-04-16 21:26:11.331 [info] *
2026-04-16 21:26:11.331 [info] * Visual Studio Code Server
2026-04-16 21:26:11.331 [info] *
2026-04-16 21:26:11.331 [info] * By using the software, you agree to
2026-04-16 21:26:11.331 [info] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
2026-04-16 21:26:11.331 [info] * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
2026-04-16 21:26:11.331 [info] *
2026-04-16 21:26:43.934 [info] [2026-04-16 21:26:43] warn error access singleton, retrying: could not connect to socket/pipe: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }
2026-04-16 21:27:18.542 [info] [2026-04-16 21:27:18] warn error access singleton, retrying: could not connect to socket/pipe: Os { code: 5, kind: PermissionDenied, message: "Access is denied." }
Asking Codex to fix was successful. It appears remote tunnel is trying to open the tunnel on the local machine, and not the VM I'm SSH'd to, and is failing to accomplish anything meaningful as a result. Codex output:
I found two useful things:
The server-side VS Code tunnel service is not installed right now. code tunnel status reports:
{"tunnel":null,"service_installed":false}
Also, your pasted error is almost certainly from the local VS Code desktop side, because it says Windows error code 5 (Access is denied). On Linux the permission code would normally be 13. So the quickest workaround is to start/install the tunnel from this server directly, bypassing the desktop singleton issue.
I started the official install command and it reached the auth picker successfully, then I stopped it so it wasn’t left hanging:
~/.vscode-server/code-560a9dba96f961efea7b1612916f89e5d5d4d679 tunnel service install --name qwen1 --accept-server-license-terms --log debug
It asked:
How would you like to log in to Visual Studio Code?
> Microsoft Account
GitHub Account
Reply with Microsoft or GitHub and I’ll continue the install. After the browser/device-code login, I’ll verify code tunnel status and the user service logs.
9:28 PM
github
9:29 PM
15 previous messages
Done. The GitHub-authenticated tunnel service is installed and running.
Verified status:
{"tunnel":{"name":"qwen1","tunnel":"Connected","last_fail_reason":null},"service_installed":true}
The user service is active as code-tunnel.service, and I also enabled linger for trbot, so the tunnel should keep running after you disconnect from the server.
Useful commands:
~/.vscode-server/code-560a9dba96f961efea7b1612916f89e5d5d4d679 tunnel status
~/.vscode-server/code-560a9dba96f961efea7b1612916f89e5d5d4d679 tunnel service log
systemctl --user status code-tunnel.service
You should now be able to connect to the tunnel named qwen1 from VS Code / vscode.dev. Next useful thing: try connecting from your local VS Code Remote Tunnels view; if it still shows the Windows-side singleton error, restart the local VS Code app once, because the server tunnel itself is healthy now.
Does this issue occur when all extensions are disabled?: N/A
Steps to Reproduce:
The tunnel fails to launch.
Remote Tunnel Service Log
Asking Codex to fix was successful. It appears remote tunnel is trying to open the tunnel on the local machine, and not the VM I'm SSH'd to, and is failing to accomplish anything meaningful as a result. Codex output: