[WSL2] No network
Microsoft Windows [Version 10.0.19025.1]
Any network activity from inside WSL2 ends up with:
../../../../lib/isc/unix/net.c:592: probing sendmsg() with IP_TOS=b8 failed: Network is unreachable
;; connection timed out; no servers could be reached
ifconfig -a reports:
bond0: flags=5122<BROADCAST,MASTER,MULTICAST> mtu 1500
ether 2e:fb:1b:47:93:0a txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
dummy0: flags=130<BROADCAST,NOARP> mtu 1500
ether 8a:4f:89:cc:4f:f8 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 00:15:5d:f5:b7:63 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=8<LOOPBACK> mtu 65536
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
sit0: flags=128<NOARP> mtu 1480
sit txqueuelen 1000 (IPv6-in-IPv4)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vEthernet (WSL) adapter is present and enabled and reports no problems.
It all worked fine till today. Today it stopped working with absolutely no apparent reason. No installations, no updates ...
I tried everything except reinstalling the whole system (which apparently I won't do, since I'll install release if decide to remove insider's), nothing helps.
I'm having the same problem on 19033. This is bizarre.
Are you using a VPN? Or any other kind of networking configuration that could affect it?
And could you please take a networking trace for us and post the feedback item here?
Thanks!
I use no VPN and/or any other peculiar networking configuration, at least I've changed nothing since previous days when things were OK.
I've created and sent the feedback according to your link but I don't know what "feedback item" is, and what should I post here (I'm also not logged in and I can't retrieve my feedback then).
I've also checked "Save log data locally" or similar (I don't remember the wording) checkbox but nothing interested happened.
I've looked into C:\ProgramData\Microsoft\Windows\WER\ReportArchive directory and found 3 recently created Critical..... directories (among older ones) with Report.wer file in each, which contain basically only the links to temporary (now gone) files used to create the report.
Upgraded to 19035 and it seems to magically be working again.
Same here. Have just upgraded and it works now.
Are there Wsl 2-related registry (or other config) entries which may be purged completely to have a chance to be rewritten by the healthy ones?
This is happening to me after my pc goes to sleep for long hours. Shutting down wsl2 (wsl.exe --shutdown) and open it again solves the problem until the next time the pc goes to sleep again for long hours.
Sleep/Hibernate isn't enabled on my machine, though.
I have noticed a lot more free space on my system disk with 20H1, and so I'm wondering if this might have something to do with the compression tech Windows is now using to shrink the size of system files. Perhaps it's touching WSL, or something WSL interacts with.
It hasn't happened to me since the 19035 update, though.
I am using WSL2 in Windows 10 insider build 19035 without any issue. You can check something like -- if eth0 interface present in wsl2, if ping to ip address work, if vEthernet (wsl) present in Windows, if Windows firewall has two inbound rules containing hns string etc. Also add the strace and/event logs as stated here.
I was using build 19033 without problems. Updated to 19037 and my internet stopped working. To be able to use the internet I had to set the nameserver to 8.8.8.8 in the /etc/resolv.conf which solves the connection failure but keeps me from using the X410. Any suggestions?
@CalBR We're all as confused as to why it randomly breaks as you are, and the tools to try and diagnose it aren't able to gather any useful information.
19041 is out and it might be a good idea to build an iso with https://UUPdump.ml and do an in-place upgrade.
I am using Window 10 Insider Beta version 2004 Build 19041.1. I installed latest Ubuntu app from MS App Store. It works fine in WSL version 1.
But after conversion to WSL 2 , network does not work.
Even ping 127.0.0.1 does not work. ( network unreachable )
nslookup result: /../../../lib/isc/unix/net.c:592: probing sendmsg() with IP_TOS=b8 failed: Network is unreachable.
I tried various fix suggested in other threads but they does not work. It is not DNS problem or /etc/resolv.conf or nsswitch.conf.
TCP/IP network socket just stopped working in WSL 2 on Window 10 Build 19041. Linux kernel does not recognize network interfaces of PC. Unix domain socket works fine.
Only working solution is converting back to WSL 1. Then it works fine again.
In attached text file, there is ifconfig -a results on WSL 2 and WSL 1, respectively.
I have exactly the same problem. No problems with WSL2 on my office PC, only my home PC. I've also tried all suggested fixes and still unable to get it working. Worst thing for me now is docker desktop stopped working on WSL1 so when I convert back to WSL1 I just get weird input / output errors now. I would rather have WSL2 fixed anyway.
Finally I solved my problem. In Hyper-V Manager > Virtual Switch Manager > WSL Adapter, switched to External Network and selected my WIFI network. Inside WSL I gave it a 192.168 IP address which is in the same range as my WIFI network, rather than the 172. range that is generated, and I had to add the 192.168 ip address in /etc/resolv.conf. I still don't know why the NAT / Internal switch doesn't work.
Same problem if/when my laptop hibernates, rebooting is the only thing that currently resolves.
Did you need to do anything before changing the connection type @rm-bergmann when I try to change my WSL Adapter to any External Network I'm getting the error below.
Virtual Switch Manager for secopsbot
Error applying Virtual Switch Properties changes
Adding ports to the switch 'WSL' failed.
The operation failed because the object was not found.
@secopsbot I think I hit that error a few times, then I hat to shut down WSL2 and run Hyper-V as administrator. The annoying thing was I had to repeat the process after every reboot. I also remember I had to right click on the wifi network adapter (in the 'view network connections' windows) and click "Remove from Bridge".
I have since deleted that instance of WSL2, and set up a new one using that same process. I can get network, but now I get the DNS resolving issue.
I had the "unreachable" problem when I turned on compression on parts of the C: partition. It solved itself after turning it off again.
I figured it was my VPN [Wireguard]. Worked fine after I disabled it.
WSL2 worked fine in 19035, But after update to 19041, WSL2 no longer has internet. Although WSL1 working fine. I am not using any VPN, it is just my PC connected via wifi to my router.
I'm observing same problem on 10.0.19041.208. Everything was working yesterday. Today, after hibernate/standby, WSL2 network is down. I can ping vEthernet from windows:
C:\WINDOWS\system32>ping 172.30.32.1
Pinging 172.30.32.1 with 32 bytes of data:
Reply from 172.30.32.1: bytes=32 time<1ms TTL=128
Reply from 172.30.32.1: bytes=32 time<1ms TTL=128
But I cannot ping it from WSL2, eth0 interface has NO-CARRIER flag:
~$ ip add show dev eth0
5: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:15:5d:25:71:f8 brd ff:ff:ff:ff:ff:ff
inet 172.30.37.116/20 brd 172.30.47.255 scope global eth0
valid_lft forever preferred_lft forever
~$ ip -4 neigh
172.30.32.1 dev eth0 lladdr 00:15:5d:f5:0c:6e STALE
~$ ping 172.30.32.1
PING 172.30.32.1 (172.30.32.1) 56(84) bytes of data.
^C
--- 172.30.32.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1076ms
Tried to flap the port on both sides (windows and WSL) - didn't help. Any workarounds other than restart Windows or WSL2?
Same here, I just reset my Windows 10 installation after a motherboard upgrade and was unable to install any WSL instances as new version 2 instances. Got them installed as version 1 instances and then was able to convert them to version 2 and none of them have working networking in version 2.