vscode-remote-release
vscode-remote-release copied to clipboard
Cannot connect to WSL with mirrored networking
- VSCode Version: 1.84.2
- Local OS Version: Windows 11 (10.0.25997)
- Remote OS Version: Linux version 5.15.133.1-microsoft-standard-WSL2
- Remote Extension/Connection Type: WSL
- Logs:
2023-11-22 23:44:26.652 [info] $getCanonicalURI invoked for authority (wsl)
2023-11-22 23:44:26.658 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl, startup: false, activationEvent: 'onResolveRemoteAuthority:wsl'
2023-11-22 23:44:26.718 [info] [resolveAuthority(wsl,1)][0ms] activating remote resolvers wsl+arch
2023-11-22 23:44:26.718 [info] [resolveAuthority(wsl,1)][0ms] activating resolver for wsl+arch...
2023-11-22 23:44:26.718 [info] [resolveAuthority(wsl,1)][0ms] invoking final resolve()...
2023-11-22 23:44:26.837 [warning] Using default string since no string found in i18n bundle that has the key: [Starting VS Code in WSL ({0})](command:remote-wsl.showLog)/{0} is distro name. do not change link format [message](command), only change message{Locked="](command:remote-wsl.showLog)"}
2023-11-22 23:44:27.731 [info] [resolveAuthority(wsl,1)][1013ms] waiting...
2023-11-22 23:44:27.776 [info] [resolveAuthority(wsl,1)][1057ms] setting tunnel factory...
2023-11-22 23:44:27.776 [info] [resolveAuthority(wsl,1)][1058ms] returned 127.0.0.1:60926
Steps to Reproduce:
- Enable
networkingMode=mirrored
in.wslconfig
. -
code .
in WSL.
Does this issue occur when you try this locally?: No Does this issue occur when you try this locally and all extensions are disabled?: No
Same problem.And I found this issue was caused by latest system version updated.
When I run wsl.exe --shutdown
, then restart wsl. This issue was fixed.But after a long time system sleep, the bug is shown again.
Same situation here
After I added the experimental settings, VS Code can no longer access WSL.
.wslconfig
[wsl2]
memory=32GB
processors=8
[experimental]
networkingMode=mirrored
dnsTunneling=true
autoProxy=true
- VS Code version: 1.84.2
- WSL version: 2.0.11.0
Running with with networkingMode=mirrored
works for me.
What does the WSL log show?
Which log do you refer to? How to obtain the WSL log?
Command: WSL: Show Log...
There's no such command, maybe because the plugin stucks when trying to connect WSL.
The extension host log:
2023-12-06 00:06:30.368 [info] Extension host with pid 24672 started
2023-12-06 00:06:30.403 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2023-12-06 00:06:30.465 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2023-12-06 00:06:30.465 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2023-12-06 00:06:30.630 [info] Eager extensions activated
2023-12-06 00:06:30.782 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:30.782 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:30.783 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl-recommender, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:30.783 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onStartupFinished', root cause: GitHub.vscode-pull-request-github
2023-12-06 00:06:30.783 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:30.784 [info] ExtensionService#_doActivateExtension usernamehw.errorlens, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:30.787 [info] ExtensionService#_doActivateExtension vadimcn.vscode-lldb, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:30.792 [info] ExtensionService#_doActivateExtension vscodevim.vim, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:30.911 [error] No bundle location found for extension ms-vscode-remote.remote-wsl-recommender
2023-12-06 00:06:31.040 [info] ExtensionService#_doActivateExtension GitHub.vscode-pull-request-github, startup: false, activationEvent: 'onStartupFinished'
2023-12-06 00:06:32.727 [info] Extension host terminating: renderer closed the MessagePort
2023-12-06 00:06:32.741 [error] Canceled: Canceled
at new f (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:108614)
at n.U (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:134:10873)
at F.<computed>.z.charCodeAt.F.<computed> (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:134:8315)
at i.g (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:139130)
at i.executeCommand (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:138568)
at $.registerCommand.description (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:137892)
at i.h (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:139669)
at i.g (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:138661)
at i.executeCommand (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:138568)
at Object.executeCommand (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:21329)
at x0.reset (c:\Users\**********\.vscode\extensions\github.vscode-pull-request-github-0.76.1\dist\extension.js:2003:7116)
at x0.dispose (c:\Users\**********\.vscode\extensions\github.vscode-pull-request-github-0.76.1\dist\extension.js:2003:7387)
at o (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:30:754)
at h.cb (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:136:9843)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:136:7793
at Array.map (<anonymous>)
at h.Y (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:136:7781)
at h.terminate (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:136:8051)
at o.terminate (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:140:1513)
at a (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:9817)
at MessagePortMain.<anonymous> (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:6242)
at MessagePortMain.emit (node:events:513:28)
at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:367) setContext undefined
2023-12-06 00:06:32.749 [info] Extension host with pid 24672 exiting with code 0
2023-12-06 00:06:33.513 [info] Extension host with pid 24644 started
2023-12-06 00:06:33.513 [info] Skipping acquiring lock for c:\Users\**********\AppData\Roaming\Code\User\workspaceStorage\d3fa3e921653199d1b2cd39d3ce11394.
2023-12-06 00:06:33.514 [info] $getCanonicalURI invoked for authority (wsl)
2023-12-06 00:06:33.528 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-wsl, startup: false, activationEvent: 'onResolveRemoteAuthority:wsl'
2023-12-06 00:06:33.596 [info] [resolveAuthority(wsl,1)][0ms] activating remote resolvers wsl+arch
2023-12-06 00:06:33.596 [info] [resolveAuthority(wsl,1)][0ms] activating resolver for wsl+arch...
2023-12-06 00:06:33.596 [info] [resolveAuthority(wsl,1)][0ms] invoking final resolve()...
2023-12-06 00:06:33.711 [warning] Using default string since no string found in i18n bundle that has the key: [Starting VS Code in WSL ({0})](command:remote-wsl.showLog)/{0} is distro name. do not change link format [message](command), only change message{Locked="](command:remote-wsl.showLog)"}
2023-12-06 00:06:34.612 [info] [resolveAuthority(wsl,1)][1015ms] waiting...
2023-12-06 00:06:35.626 [info] [resolveAuthority(wsl,1)][2030ms] waiting...
2023-12-06 00:06:36.642 [info] [resolveAuthority(wsl,1)][3045ms] waiting...
2023-12-06 00:06:36.754 [info] [resolveAuthority(wsl,1)][3158ms] setting tunnel factory...
2023-12-06 00:06:36.754 [info] [resolveAuthority(wsl,1)][3158ms] returned 127.0.0.1:57911
In the terminal view, you should see a tab 'WSL'
I cannot find any tab named 'WSL'. The terminal tab is empty inside and cannot launch a WSL shell.
And by the way, this error only occurs on the Windows Insider Canary.
I am also facing the same problem. Switched to mirrored network mode and now I cannot connect to WSL.
Hey! I also meet this problem. I can use VSCode to connect to WSL, but the speed is very slow. It takes about 40 seconds to open the first terminal. My .wslconfig only set the networkingMode.
- Hardware: Intel i9-13905H with 32G memory
- VSCode Version: 1.85.2
- OS Version: Windows 11 10.0.22621.3007
- WSL Version: 2.0.14.0
- kernel Version: 5.15.133.1-1
same issue here after I removed
[wsl2] networkingMode=mirrored it working fine
Thanks all for the continued feedback. For those who are still experiencing this: to help the WSL team take a closer look, could you please take a trace? https://github.com/microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1.
Started hitting this earlier today when my VSCode instance updated to 1.86, although reverting to an earlier version of VSCode/remote extensions did not seem to help.
Logs with mirrored networking off and able to connect to WSL/open a folder from VSCode. WslLogs-2024-02-01_14-44-18-CanOpen.zip
Logs with mirrored networking on and not able to connect to WSL/open a folder in VSCode. WslLogs-2024-02-01_14-48-45-CantConnect.zip
Both log collections were performed by shutting down wsl via wsl --shutdown
, waiting an appropriate amount of time, starting the log collection script, then opening the Ubuntu
application/WSL window, and then attempting to connect inside WSL
Same problem.
Also affected here, I'm also not sure if mirroredmode is still experimental or not?
Specs: Hardware: AMD Ryzen 7 PRO 5850U with 32G memory VSCode Version: 1.86.2 WSL-Version: 2.0.14.0 Kernelversion: 5.15.133.1-1 Windows-Version: 10.0.22631.3155
@craigloewen-msft We need the help of the WSL team here
What's the state of mirroredmode
? I see there are many open issues on this also in the WSL inbox.
Is there a FAQ that helps to debug and fix these issues?
I've also opened an issue on the WSL side: https://github.com/microsoft/WSL/issues/11184.
Has this bug been fixed?
This week I've found that the bug has been fixed in the latest canary Windows. As the original author of the issue, I'll close it till the bug re-occurs.
Hi. Can you please collect networking logs by following the instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues