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

[wsl] Support connecting to the remote server through a wsl.exe proxy #5894

Closed
aeschli opened this issue Nov 16, 2021 · 4 comments
Closed

[wsl] Support connecting to the remote server through a wsl.exe proxy #5894

aeschli opened this issue Nov 16, 2021 · 4 comments
Assignees
Labels
connection on-testplan reconnecting Attempting to reconnect and it isn't clear why wsl Issue in vscode-remote WSL
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented Nov 16, 2021

We're trying to tackle reconnection issues by avoiding to have a websocket connection into the distro. Instead, we want to use the wsl.exe command to establish the connection through stdin/out.
This matches the way containers and ssh do it.

Known connection issues:
#3454
#3158
#3126
#5329

microsoft/vscode#121799

@aeschli aeschli self-assigned this Nov 16, 2021
@aeschli aeschli added wsl Issue in vscode-remote WSL connection reconnecting Attempting to reconnect and it isn't clear why labels Nov 16, 2021
@aeschli aeschli added this to the November 2021 milestone Nov 16, 2021
@aeschli
Copy link
Contributor Author

aeschli commented Nov 16, 2021

The new connection method is now available in Remote-WSL 0.63.0:

If you are on VS Code Insiders, please try it.

  • verify that you have Remote-WSL v0.63.0 or higher
  • enable the setting "remote.WSL2.connectionMethod": "wslExeProxy"
  • close all windows of VS Code, wait a few seconds
  • Open a new WSL window. In the WSL log you should see Started local proxy server on portXY.

All should work as normal from here on. Please let me know if you still see reconnection issues on sleep, hibernate & network adopter changes.

@aeschli
Copy link
Contributor Author

aeschli commented Nov 16, 2021

In Remote-WSL v0.63.2, the new option is enabled by default for WSL2

@Bentzeh
Copy link

Bentzeh commented Dec 14, 2021

Hi I've encountered an issue
I think it's related to #6031 since vscode is giving me an error:
"Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)"

so like the thread said I've run the show log command and this is the output:

[2021-12-14 21:37:54.132] Resolving wsl+Ubuntu-20.04, resolveAttempt: 1
[2021-12-14 21:37:54.166] Starting VS Code Server inside WSL (wsl2)
[2021-12-14 21:37:54.166] Extension version: 0.63.11
[2021-12-14 21:37:54.166] Windows build: 19044. Multi distro support: available. WSL path support: enabled
[2021-12-14 21:37:54.242] Using shell environment from invoking shell: /tmp/vscode-distro-env.fFsPqO
[2021-12-14 21:37:54.387] Connecting to daemon started by other Remote-WSL window... 4.19.104-microsoft-standard Ubuntu-20.04
[2021-12-14 21:37:54.387] WSL resolver response: 127.0.0.1:62295
[2021-12-14 21:37:54.387] To debug connection issues, open a local browser on http://127.0.0.1:62295/version
[2021-12-14 21:37:54.387] Using 'wslExeProxy' to connect to the VS Code server as configured by setting 'remote.WSL2.connectionMethod'
[2021-12-14 21:37:54.387] 'wslExeProxy' should fix reconnection issues after sleep and network adapter changes.
[2021-12-14 21:37:54.387] Please report issues related with the new setting to https://github.com/microsoft/vscode-remote-release/issues/5894
[2021-12-14 21:37:54.387] To revert back to the old way of connecting, change setting 'remote.WSL2.connectionMethod' to 'wsl2VMAddress'.

not sure if I'm in the right spot but i hope it helps

@aeschli
Copy link
Contributor Author

aeschli commented Dec 15, 2021

I created #6067 for @Bentzeh issue.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
connection on-testplan reconnecting Attempting to reconnect and it isn't clear why wsl Issue in vscode-remote WSL
Projects
None yet
Development

No branches or pull requests

2 participants