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

WSL2 connectivity issues with build 19536 #2060

Closed
meatherly opened this issue Dec 19, 2019 · 16 comments
Closed

WSL2 connectivity issues with build 19536 #2060

meatherly opened this issue Dec 19, 2019 · 16 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded wsl2 WSL 2 related issues
Milestone

Comments

@meatherly
Copy link

Issue Type: Bug

The error pop up shows:
Unable to open 'my-app': Unable to read file (Error: connect ECONNREFUSED ::1:43283).

I also don't have any of my installed extensions. Please let me know if there is anything I can do to help you guys debug the issue.

VS Code version: Code 1.41.0 (9579eda04fdb3a9bba2750f15193e5fafe16b959, 2019-12-11T18:37:42.077Z)
OS version: Windows_NT x64 10.0.19536
Fetching remote diagnostics for 'WSL: Ubuntu' failed: connect ECONNREFUSED ::1:43283

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.72GB (7.05GB free)
Process Argv
Screen Reader no
VM 0%

Fetching remote diagnostics for 'WSL: Ubuntu' failed: connect ECONNREFUSED ::1:43283

Extensions: none
@meatherly
Copy link
Author

meatherly commented Dec 19, 2019

This is what is in my hosts file on windows
one of them has:

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost
192.168.2.236 host.docker.internal
192.168.2.236 gateway.docker.internal
172.16.0.64 host.docker.internal
172.16.0.64 gateway.docker.internal
192.168.2.235 host.docker.internal
192.168.2.235 gateway.docker.internal
172.16.0.165 host.docker.internal
172.16.0.165 gateway.docker.internal
 host.docker.internal
 gateway.docker.internal
172.16.1.88 host.docker.internal
172.16.1.88 gateway.docker.internal
# Added by Docker Desktop
10.0.0.7 host.docker.internal
10.0.0.7 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section

What is really strange is that if I shutdown wsl2 to and then start it backup code will work but then trying to connect to localhost from windows doesn't. It's either one or the other works. Either I can connect to an app running on wsl from windows or I can use code to edit file on wsl but I can't do both. 🤔

Trying to give you guys as much info as I can.

@meatherly
Copy link
Author

Today I tried restoring my windows instance by using the restore tool and after it was done restoring it removed Windows insiders preview 15536.1000 and the issue went away. I'll try reinstalling that version to see if the problem comes back.

@meatherly
Copy link
Author

After installing the update it seems like the problem is back. I can launch code and it connects to the folder but when I run nc -lk 0.0.0.0 3000 | bash and try to access it from the windows side with chrome localhost:3000 I can't.

@aaronpowell
Copy link

I think there may be a problem with the 19536.1000 build of Windows as I'm hitting problems with wsl2 networking which is seen as things like the extension can't find the remote instances and when running something from wsl2 the port(s) aren't exposed.

@aaronpowell
Copy link

cross referencing a potentially relevant WSL issue microsoft/WSL#4769

@brennaman
Copy link

I restored Windows to the version prior to 19536.1000 and my WSL issue went away as well.

@aeschli aeschli changed the title I can launch code from wsl2 but it can't connect the folder after it loads WSL2 connectivity issues with build 19536 Dec 30, 2019
@aeschli aeschli added the wsl2 WSL 2 related issues label Dec 30, 2019
@slooker
Copy link

slooker commented Dec 30, 2019

I restored Windows to the version prior to 19536.1000 and my WSL issue went away as well.

How did you restore? I'm running into the same issue right now and can't seem to figure out how to go back to the old build.

@brennaman
Copy link

@slooker to restore to previous version go to Windows Settings -> Update & Security -> Recovery. From there you should see a section "Go back to the previous version of Windows 10".

@aeschli
Copy link
Contributor

aeschli commented Jan 6, 2020

dup of #2060

It's a WSL2 issue.
I just released a new version of the extension - Remote - WSL 0.42.1 - that should work around the issue. It requires VSCode Insiders (1.42.0). It would be great if you can give it a try. If it works I can also make a version for the stable VSCode (1.41.1).

@aaronpowell
Copy link

@aeschli looks like the latest update resolves the problem (running Win10 19536 and VS Code Insiders 1.42.0).

@bplasmeijer
Copy link

No issue anymore with (Remote - WSL 0.42.1) @aeschli ; I did test the sleep and hibernate mode.

Thanks a lot.
Bart

@oorestisime
Copy link

Same here, issue fixed with the new version.

@gualterandre
Copy link

I can confirm as well. Fixed with VC Code Insiders. Waiting on VSCode stable release.

@Nathan-Furnal
Copy link

Hi, will we see a quick patch for VS Code proper or do we have to wait until the update?

Thanks for the good work

@aeschli
Copy link
Contributor

aeschli commented Jan 7, 2020

I just published Remote - WSL 0.41.7 that works with VSCode Stable (1.41.x).

@Nathan-Furnal
Copy link

Nathan-Furnal commented Jan 7, 2020 via email

@aeschli aeschli added bug Issue identified by VS Code Team member as probable bug verified Verification succeeded labels Jan 27, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded wsl2 WSL 2 related issues
Projects
None yet
Development

No branches or pull requests

9 participants