Skip to content

WSL2 Slow Start Up Behind Corporate Proxy #4888

@yokall

Description

@yokall

I've been having an issue with VSCode taking over a minute to start from WSL2 for a few months now, I found this issue, #3851, which gave me a workaround of removing the http_proxy system env variable. I would like to know why this is an issue though or if there is some other way I can work around it as it is convenient me having the proxy set in the env variable.

I tried adding the ip in the log below to no_proxy inside WSL but it seems to be linked to windows rather than WSL itself. VSCode does then load and work fine once it uses ::1:36869, is there perhaps a way for it to go straight to this rather than trying the ip address first?

One other thing to add is that this only happens on WSL2, WSL1 is fine.

This is the WSL log output when starting

[2021-03-02 11:39:09.199] Using shell environment from invoking shell: /tmp/vscode-distro-env.D9Yczp
[2021-03-02 11:39:09.392] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 -e sh -c "[ -d ~/.vscode-server/bin/622cb03f7e070a9670c94bae1a45d78d7181fbd4 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2021-03-02 11:39:09.573] Probing result: found
[2021-03-02 11:39:09.574] Server install found in WSL
[2021-03-02 11:39:09.575] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-20.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 622cb03f7e070a9670c94bae1a45d78d7181fbd4 stable .vscode-server 0  '}
[2021-03-02 11:39:09.691] Setting up server environment: Looking for /home/barista/.vscode-server/server-env-setup. Not found.
[2021-03-02 11:39:09.691] WSL version: 4.19.128-microsoft-standard Ubuntu-20.04
[2021-03-02 11:39:09.691] WSL2-shell-PID: 627
[2021-03-02 11:39:09.691] Starting server: /home/barista/.vscode-server/bin/622cb03f7e070a9670c94bae1a45d78d7181fbd4/server.sh  --port=0 --use-host-proxy --without-browser-env-var --enable-remote-auto-shutdown 
[2021-03-02 11:39:09.992] 
[2021-03-02 11:39:09.992] 
[2021-03-02 11:39:09.992] *
[2021-03-02 11:39:09.992] * Visual Studio Code Server
[2021-03-02 11:39:09.992] *
[2021-03-02 11:39:09.992] * Reminder: You may only use this software with Visual Studio family products,
[2021-03-02 11:39:09.992] * as described in the license https://aka.ms/vscode-remote/license
[2021-03-02 11:39:09.992] *
[2021-03-02 11:39:09.992] 
[2021-03-02 11:39:09.992] IP Address: 172.17.164.22
[2021-03-02 11:39:09.992] Extension host agent listening on 36869
[2021-03-02 11:39:09.992] 
[2021-03-02 11:39:09.992] [11:39:09] Extension host agent started.
[2021-03-02 11:39:10.011] Pinging 172.17.164.22:36869...
[2021-03-02 11:40:25.179] 172.17.164.22:36869 no response
[2021-03-02 11:40:25.179] WSL resolver response: ::1:36869
[2021-03-02 11:40:25.179] To debug connection issues, open a local browser on http://[::1]:36869/version

Metadata

Metadata

Assignees

No one assigned

    Labels

    wslIssue in vscode-remote WSL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions