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 Networking Breaks #4810

Closed
hbjydev opened this issue Jan 11, 2020 · 9 comments
Closed

WSL2 Networking Breaks #4810

hbjydev opened this issue Jan 11, 2020 · 9 comments
Labels

Comments

@hbjydev
Copy link

hbjydev commented Jan 11, 2020

Apologies for the vague title, I'm not sure how to go about naming this.

I'm on build 19041.1 and I'm running into numerous WSL2 network issues.

At first, it was that I couldn't access any ports on the WSL2 instance via IPv4, but I could over IPv6. Apparently this is some sort of only-one-port-at-a-time bug? Not sure where I saw it, but still. In any case, a simple wsl --shutdown command in PowerShell seemed to fix it.

Then, the issue arose that I couldn't ping outwards. At all. I tried ping google.com, ping 1.1.1.1...
ping google.com returned ping: google.com: Temporary failure in name resolution.

ping 1.1.1.1 returned this:

PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
From 172.29.190.109 icmp_seq=1 Destination Host Unreachable
From 172.29.190.109 icmp_seq=2 Destination Host Unreachable
From 172.29.190.109 icmp_seq=3 Destination Host Unreachable
From 172.29.190.109 icmp_seq=4 Destination Host Unreachable
From 172.29.190.109 icmp_seq=5 Destination Host Unreachable
^C
--- 1.1.1.1 ping statistics ---
6 packets transmitted, 0 received, +5 errors, 100% packet loss, time 5101ms
pipe 3

And I'm tearing my hair out at this point. Is this a known issue? If not, how fast can I get this fixed?

@EternalDeiwos
Copy link

Also had this and wsl --shutdown also fixed it for me but couldn't access anything hosted within WSL from the windows side.

@sitepodmatt
Copy link

sitepodmatt commented Jan 14, 2020

The localhost port integration gets fixed and regresses in a stable pattern every couple of weeks (and has done for several months). A bit like Intel's old tick tock cycle, benhillis claims on another related issue that they currently have a fix in the oven for latest round of localhost one-port-at-a-time regressions, but it hasn't been mentioned if it will be targetting the Slow or Fast ring, I suspect the latter. tl;dr wait a few weeks, in the meantime wsl --shutdown is your friend

@mrtumnus
Copy link

mrtumnus commented Mar 4, 2020

Also had this and wsl --shutdown also fixed it for me but couldn't access anything hosted within WSL from the windows side.

--shutdown does not show as an option for my wsl.exe program. Do you mean wsl -- shutdown (pass shutdown to bash?).

I fixed the issue by deleting /etc/resolv.conf (it was empty!), closing my bash session, and re-opening it. resolv.conf was re-generated and contained the appropriate information.

@hbjydev
Copy link
Author

hbjydev commented Mar 8, 2020

@mrtumnus wsl --shutdown is the one, for sure.

wsl --shutdown

@mrtumnus
Copy link

mrtumnus commented Apr 2, 2020

@itshaydendev Hmm, I'm not getting the same result. This is on Windows 10 1909.

image

@dgellow
Copy link

dgellow commented Sep 15, 2020

I'm on OS build 20211.1000, I'm also facing network issues from WSL2.

When trying to ping an IP from remote or local network, or even the IP of the Windows host, it fails with "Destination Host Unreachable".

A WSL shutdown doesn't solve the issue.

@dgellow
Copy link

dgellow commented Sep 15, 2020

Hmm, one thing I notice is that the WSL Ethernet adapter on Windows isn't connected.

image

@hookenz
Copy link

hookenz commented Jul 29, 2021

Why was this closed? It's flakey for me under wsl2 also 2021. Up to date with all patches. I usually have to reboot my pc once a day to fix it. Windows cannot reach my docker and linux apps running under WSL2 linux.

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants