Open armenic opened 3 years ago
About 90K of my company employees are on this version of the windows and we do not have any means to upgrade windows ourselves. I assume similar thing happens in other companies. The biggest frustration was to find out that WSL2 does not work after waiting for this for a year. And now I have to wait another year and hopefully with the next enterprise incremental update wsl2 starts working. I hope Microsoft can push a hotfix.
What is your networking set up like on this machine? Do you have any VPNs?
hi @craigloewen-msft, thank you so much the follow-up. We do have an option to use VPN and most of the time it is turned off. I can get any extra information you need if you tell me how to get that information :) By the way, your demo videos of wsl-2 are super cool and will attract a lot of developers to use WSL-2, so please make it working https://docs.microsoft.com/en-us/windows/wsl/about
by the way if I convert the distro to use WSL-1 wsl --set-version Ubuntu-18.04 1
it works like a charm and I really, really want that WSL-2 also works like it.
Could you please try the scenario where you don't have internet access and try to use WSL 2 both with the VPN turned on and off?
And could you also file feedback when you're in the state where your network access doesn't work? (Instructions here).
Also thank you for the positive feedback! 😁
I did the following:
sudo apt update
persistssudo apt update
persistssudo apt update
persistsUnfortunately I am not able to file data since my organization settings prevent Feedback Hub to work as you see below. Sorry for that.
@armenic: Can you please the output of the following commands:
?
@OneBlue, thanks for follow-up:
manukyae@GNELTCG8424MZX:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 16:e9:0d:c5:12:a9 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 56:81:44:02:b6:80 brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:f3:46:0d brd ff:ff:ff:ff:ff:ff
inet 172.18.49.8/28 brd 172.18.49.15 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fef3:460d/64 scope link
valid_lft forever preferred_lft forever
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
manukyae@GNELTCG8424MZX:~$ ip route show
default via 172.18.49.1 dev eth0
172.18.49.0/28 dev eth0 proto kernel scope link src 172.18.49.8
manukyae@GNELTCG8424MZX:~$ traceroute 1.1.1.1
Command 'traceroute' not found, but can be installed with:
sudo apt install inetutils-traceroute
sudo apt install traceroute
manukyae@GNELTCG8424MZX:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.18.49.1
manukyae@GNELTCG8424MZX:~$
The same problem has appeared today for me after the last Windows update kb4598242. On Windows 10 Pro 2004 build 19041.746 There is no VPN.
>ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 7e:31:83:f9:51:56 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 2a:9f:8a:73:1e:5f brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:a3:40:85 brd ff:ff:ff:ff:ff:ff
inet 172.29.17.34/20 brd 172.29.31.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fea3:4085/64 scope link
valid_lft forever preferred_lft forever
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
>ip route show
default via 172.29.16.1 dev eth0
172.29.16.0/20 dev eth0 proto kernel scope link src 172.29.17.34
>traceroute 1.1.1.1
Command 'traceroute' not found, but can be installed with:
sudo apt install inetutils-traceroute
sudo apt install traceroute
>cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.29.16.1
Thank you for the info @armenic .
It looks like traceroute isn't installed, and without an internet connection, you can't install it, so can you please the share the output of the following:
What I'm trying to figure out is if this is a DNS or a routing issue.
Just to give an update. I uninstalled the security Windows update kb4598242. Then reboot. Then it reinstalled itself. Then reboot. And now I have access to internet again on my WSL-2 Ubuntu 18.04.5 LTS!
@OneBlue, I have a feeling that you are going to get to the root cause! Here we go, as you requested:
manukyae@GNELTCG8424MZX:~$ ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=56 time=23.6 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=56 time=20.1 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=56 time=19.6 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=56 time=23.9 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=56 time=19.1 ms
64 bytes from 1.1.1.1: icmp_seq=6 ttl=56 time=28.7 ms
64 bytes from 1.1.1.1: icmp_seq=7 ttl=56 time=19.8 ms
64 bytes from 1.1.1.1: icmp_seq=8 ttl=56 time=20.2 ms
64 bytes from 1.1.1.1: icmp_seq=9 ttl=56 time=20.2 ms
64 bytes from 1.1.1.1: icmp_seq=10 ttl=56 time=19.6 ms
64 bytes from 1.1.1.1: icmp_seq=11 ttl=56 time=21.1 ms
64 bytes from 1.1.1.1: icmp_seq=12 ttl=56 time=20.6 ms
64 bytes from 1.1.1.1: icmp_seq=13 ttl=56 time=20.4 ms
64 bytes from 1.1.1.1: icmp_seq=14 ttl=56 time=20.1 ms
64 bytes from 1.1.1.1: icmp_seq=15 ttl=56 time=20.2 ms
^C
--- 1.1.1.1 ping statistics ---
15 packets transmitted, 15 received, 0% packet loss, time 14025ms
rtt min/avg/max/mdev = 19.153/21.202/28.747/2.413 ms
manukyae@GNELTCG8424MZX:~$ ping $(ip route show | awk '/default/ { print $3 }')
PING 172.18.49.1 (172.18.49.1) 56(84) bytes of data.
64 bytes from 172.18.49.1: icmp_seq=1 ttl=128 time=0.476 ms
64 bytes from 172.18.49.1: icmp_seq=2 ttl=128 time=0.477 ms
64 bytes from 172.18.49.1: icmp_seq=3 ttl=128 time=0.487 ms
64 bytes from 172.18.49.1: icmp_seq=4 ttl=128 time=0.594 ms
64 bytes from 172.18.49.1: icmp_seq=5 ttl=128 time=0.680 ms
64 bytes from 172.18.49.1: icmp_seq=6 ttl=128 time=0.626 ms
64 bytes from 172.18.49.1: icmp_seq=7 ttl=128 time=0.822 ms
64 bytes from 172.18.49.1: icmp_seq=8 ttl=128 time=0.664 ms
64 bytes from 172.18.49.1: icmp_seq=9 ttl=128 time=0.757 ms
64 bytes from 172.18.49.1: icmp_seq=10 ttl=128 time=0.684 ms
64 bytes from 172.18.49.1: icmp_seq=11 ttl=128 time=0.602 ms
64 bytes from 172.18.49.1: icmp_seq=12 ttl=128 time=0.547 ms
64 bytes from 172.18.49.1: icmp_seq=13 ttl=128 time=0.580 ms
64 bytes from 172.18.49.1: icmp_seq=14 ttl=128 time=0.579 ms
64 bytes from 172.18.49.1: icmp_seq=15 ttl=128 time=0.703 ms
^C
--- 172.18.49.1 ping statistics ---
15 packets transmitted, 15 received, 0% packet loss, time 14531ms
rtt min/avg/max/mdev = 0.476/0.618/0.822/0.101 ms
manukyae@GNELTCG8424MZX:~$
just to be helpful in case this is DNS issue, the wget
output that was supposed to download the file:
manukyae@GNELTCG8424MZX:/mnt/c/Users/manukyae$ wget http://wordpress.org/latest.tar.gz
--2021-01-14 21:35:52-- http://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘wordpress.org’
manukyae@GNELTCG8424MZX:/mnt/c/Users/manukyae$
@armenic: Yes, something is clearly wrong with DNS.
Can you share the output of cat /etc/resolv.conf
, and then try to replace 'nameserver X.X.X.X' by 'nameserver 1.1.1.1' in that file and check if the wget command succeeds after doing that ?
here we go my friend (@OneBlue), anything you say:
original state
manukyae@GNELTCG8424MZX:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.18.49.1
after change which I guess did not help :(
manukyae@GNELTCG8424MZX:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 1.1.1.1
manukyae@GNELTCG8424MZX:~$ wget http://wordpress.org/latest.tar.gz
--2021-01-14 22:11:01-- http://wordpress.org/latest.tar.gz
Resolving wordpress.org (wordpress.org)... failed: Temporary failure in name resolution.
wget: unable to resolve host address ‘wordpress.org’
Thank you @armenic.
This is interesting, ICMP works, but IP doesn't. This appears to be a routing issue, so I'm gonna need to collect some logs and have a deeper look at what's happening.
I know that you can't use Feedback Hub, so can you please follow the Record WSL logs manually section I just created and share the log file ?
(Note: the PR isn't merged yet, so the wprp file needs to be downloaded from here)
dear @OneBlue, thank you so much for diligently working on this issue. I followed your instructions and the generated wsl.etl
is attached. Please note that I had to zip it so that GitHub allows attaching. Good luck with your investigation!
wsl.zip
@OneBlue @armenic very similar situation here. I have already taken the following steps:
Please advise how to proceed; I am a Windows Insider in the beta channel and my machine is fully up-to-date. I have Feedback Hub locally installed and I am familiar with provided feedback and performing diagnostic captures. Anything you need as far as analytics is concerned, I am happy to provide.
This is very important for me to get fixed because during this past summer I moved my dev environment over to WSL 2 almost exclusively. I am a professional JavaScript/web developer so I have upcoming deadlines/commitments to several clients/companies, and without this functionality, my productivity is quite trivial. Thank you in advance!
@killshot13 I use WSL2 and haven't had this issue, but have had an issue with the clock: https://github.com/microsoft/WSL/issues/5324 - at least one of two things I did seemed to fix that issue: 1) Upgrading from Ubuntu 18.04 to 20.04, and 2) Switching from the Windows Insider Beta channel back to the Windows Preview channel. I also had random green screen system crashes on the Beta channel.
As you've reinstalled Ubuntu - it seems that sometimes a distro needs to be re-registered with WSL, either by upgrading/reinstalling or by forcing it with wsl --unregister <DistroName>
, then wsl --set-default <DistroName>
- maybe that's not the problem - but have you tried going back to the Preview channel? Just a shot in the dark to try, perhaps.
My winver is 20H2 19042.746.
@drkvogel I have not tried that yet; honestly I hadn't thought of it but it's certainly worth a shot. Stay tuned, and thank you!
@OneBlue, sorry to bother. Just to let you know that the same issue happens with any Linux distro + WSL2, I tried Ubuntu 20.04 LTS and Kali as well. Hopefully the solution for Ubuntu 18.04 will be applicable to all distros.
尝试了centos,ubuntu,debain,都不可以,什么时候能解决这个问题呢?
@armenic : From what we can see in the logs, the issue appears to come from deeper in the stack, so we'll need more diagnostics.
I've updated the "networking issues" section with a new script that should gather everything we need.
Can you please run this script and share both the generated wsl.etl
, and the script output ?
@killshot13: Please follow the same instructions so we can figure out if it's the same issue or not.
@OneBlue, thanks for follow-up. Both the output and wsl.etl are in the attached zip file. Please keep doing the great job! networking_output_and_wsl.zip
@OneBlue, thank you for getting back to us! Everything you requested should be available using this link. Please let me know if you encounter any difficulties or anomalies.
Having a similar if not the same exact issue. User has anyconnect VPN client. Disconnecting from VPN and closing WSL does not fix the issue for him either.
Short story :
Just fixed a similar issue in a very strange way, it might be worth to give it a try : by deselecting compressing properties of my C:\Users\XXXXX\AppData\Local\Temp folder
(Properties->Advanced attributes)
Long story:
All of a sudden, my WSL 2 Ubuntu distro wouldn't start anylonger due to issue the the virtual disk. I found out that removing that pesky compression properties on the virtual disk file fixed the pb.
But another issue came out, VSCode remote-WSL couldn't connect anymore to my distro. After extensive research I found a dude who fixed the same issue by re-creating his missing C:\Users\XXXXX\AppData\Local\Temp
folder
Unfortunately my Temp folder was already there, so I tried to uncheck the compression properties as well , and.. it worked
@rm-guru, thank you, of course, for sharing; unfortunately, I have checked to see if these boxes were selected, and they were not checked in my case. However, reading your solution gave me an idea, albeit a long shot at best.
@OneBlue and @drkvogel, feel free to weigh in.
Is it possible that some of the stored data within the App Data folder (C:\Users\XXXXX\AppData
) has somehow gotten rearranged and is causing this issue because WSL2 uses parameters (ports, etc.,) based on this data? If possible, I wonder would it be too risky to consider deleting certain folders to test this?
Not sure if this might help @OneBlue, but here are the side-by-side results of reproducing the error if the user selects docker-desktop rather than ubuntu as the default distro.
Thanks for the logs @armenic.
To diagnose this we're gonna need a network capture. I've updated the network diagnostic script to capture that as well.
Also, based on the script output:
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
It appears that you have no distro installed.
So can you please install a wsl distro (ubuntu / debian would be fine), and run the script again (make sure to get the latest version of the script) and share its output, wsl.etl
AND packets.etl
?
New install of ubuntu 20
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: dev
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.72-microsoft-standard-WSL2 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Mon Feb 1 14:02:28 SAST 2021
System load: 0.23 Memory usage: 0% Processes: 8
Usage of /: 0.4% of 250.98GB Swap usage: 0% Users logged in: 0
1 update can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable
The list of available updates is more than a week old.
To check for new updates run: sudo apt update
This message is shown once once a day. To disable it please create the
/home/dev/.hushlogin file.
dev@Dark-Matter:~$ ping google.com
ping: google.com: Temporary failure in name resolution
Diagnostics
C:\Users\rough\AppData\Local\Temp\WSL\diagnostics>networking.bat
HNS objects:
{
"ActivityId":"9C610DD8-5465-477F-A903-165BBDC1CFF4",
"AdditionalParams":{
},
"CurrentEndpointCount":1,
"DNSServerList":"192.168.192.1",
"Extensions":[
{
"Id":"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A",
"IsEnabled":false,
"Name":"Microsoft Windows Filtering Platform"
},
{
"Id":"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017",
"IsEnabled":false,
"Name":"Microsoft Azure VFP Switch Extension"
},
{
"Id":"430BDADD-BAB0-41AB-A369-94B67FA5BE0A",
"IsEnabled":true,
"Name":"Microsoft NDIS Capture"
}
],
"Flags":9,
"GatewayMac":"00-15-5D-FD-AE-26",
"Health":{
"AddressNotificationMissedCount":0,
"AddressNotificationSequenceNumber":1,
"DHCPNotificationMissedCount":0,
"DHCPNotificationSequenceNumber":0,
"DNSCacheNotificationMissedCount":0,
"DNSCacheNotificationSequenceNumber":0,
"DNSNotificationMissedCount":0,
"DNSNotificationSequenceNumber":0,
"InterfaceNotificationMissedCount":0,
"InterfaceNotificationSequenceNumber":0,
"LastErrorCode":0,
"LastUpdateTime":132566544868952770,
"MacAddressNotificationMissedCount":0,
"MacAddressNotificationSequenceNumber":0,
"NeighborNotificationMissedCount":0,
"NeighborNotificationSequenceNumber":0,
"RouteNotificationMissedCount":0,
"RouteNotificationSequenceNumber":0,
"XlatNotificationMissedCount":0,
"XlatNotificationSequenceNumber":0
},
"ID":"B95D0C5E-57D4-412B-B571-18A81A16E005",
"IPv6":false,
"IsolateSwitch":true,
"LayeredOn":"46764F87-1AE7-4812-A01A-553F05B2A80B",
"MacPools":[
{
"EndMacAddress":"00-15-5D-FD-AF-FF",
"StartMacAddress":"00-15-5D-FD-A0-00"
}
],
"MaxConcurrentEndpoints":1,
"Name":"WSL",
"NatName":"ICSCDC07DB2-D173-4CF5-A3FC-853E94C5564B",
"Policies":[
],
"State":1,
"Subnets":[
{
"AdditionalParams":{
},
"AddressPrefix":"192.168.192.0/20",
"Flags":0,
"GatewayAddress":"192.168.192.1",
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566544247259231
},
"ID":"C42124B6-7480-4727-9AAA-28444A637CAF",
"IpSubnets":[
{
"AdditionalParams":{
},
"Flags":3,
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566544247259231
},
"ID":"6DBE631E-1559-46B8-A34D-77AC0AA8F38F",
"IpAddressPrefix":"192.168.192.0/20",
"ObjectType":6,
"Policies":[
],
"State":0
}
],
"ObjectType":5,
"Policies":[
],
"State":0
}
],
"TotalEndpoints":2,
"Type":"ICS",
"Version":47244640266,
"Layer":{
"ActivityId":"8AEC6FBD-6F74-4531-9A79-DA257EECB15F",
"AdditionalParams":{
},
"Extensions":[
{
"Id":"E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A",
"IsEnabled":false,
"Name":"Microsoft Windows Filtering Platform"
},
{
"Id":"E9B59CFA-2BE1-4B21-828F-B6FBDBDDC017",
"IsEnabled":false,
"Name":"Microsoft Azure VFP Switch Extension"
},
{
"Id":"430BDADD-BAB0-41AB-A369-94B67FA5BE0A",
"IsEnabled":true,
"Name":"Microsoft NDIS Capture"
}
],
"Flags":0,
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566544247269175
},
"ID":"46764F87-1AE7-4812-A01A-553F05B2A80B",
"IsFSE":false,
"IsSDN":false,
"MacPools":[
{
"EndMacAddress":"00-15-5D-FE-AF-FF",
"StartMacAddress":"00-15-5D-FE-A0-00"
}
],
"Name":"WSL",
"Policies":[
],
"State":0,
"SubType":"NAT",
"SupportsIpv6":false,
"Type":"Layered",
"Version":47244640266,
"Resources":{
"AdditionalParams":{
},
"AllocationOrder":1,
"Allocators":[
{
"AdditionalParams":{
},
"AllocationOrder":0,
"ExternalNic":false,
"Flags":0,
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566544247269175
},
"ID":"5EE4DC00-606E-4032-87FD-55F098A197C2",
"IsPolicy":false,
"IsolateSwitch":true,
"MacAddress":"WSL",
"State":3,
"SwitchAllocated":true,
"SwitchId":"7C946C8A-0542-4658-96A2-3AEA4963E5B6",
"Tag":"Virtual Switch"
}
],
"CompartmentOperationTime":0,
"Flags":0,
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566544247269175
},
"ID":"8AEC6FBD-6F74-4531-9A79-DA257EECB15F",
"PortOperationTime":0,
"State":1,
"SwitchOperationTime":0,
"VfpOperationTime":0
}
},
"Resources":{
"AdditionalParams":{
},
"AllocationOrder":2,
"Allocators":[
{
"AdapterNetCfgInstanceId":"{CDC07DB2-D173-4CF5-A3FC-853E94C5564B}",
"AdditionalParams":{
},
"AllocationOrder":0,
"CompartmendId":0,
"Connected":true,
"DNSFirewallRules":true,
"DevicelessNic":false,
"DhcpDisabled":true,
"EndpointNicGuid":"B4D5244B-C3E9-4E23-B039-956563E87DBF",
"EndpointPortGuid":"B3FC7256-1B65-42B1-8FED-7CF1D52C5017",
"Flags":0,
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566544250732516
},
"ID":"F971016D-88BA-4261-B3C8-75505949198F",
"InterfaceGuid":"CDC07DB2-D173-4CF5-A3FC-853E94C5564B",
"IsPolicy":false,
"IsolationId":0,
"MacAddress":"00-15-5D-9B-D7-BE",
"ManagementPort":true,
"NcfHidden":false,
"NicFriendlyName":"WSL",
"NlmHidden":true,
"PreferredPortFriendlyName":"Container NIC f971016d",
"State":3,
"SwitchId":"7C946C8A-0542-4658-96A2-3AEA4963E5B6",
"Tag":"Host Vnic",
"WaitForIpv6Interface":false,
"nonPersistentPort":false
},
{
"AdditionalParams":{
},
"AllocationOrder":1,
"Dhcp":false,
"Dns":true,
"ExternalInterfaceConstraint":0,
"Flags":0,
"Health":{
"DHCPState":1,
"DNSState":2,
"ICSState":2,
"LastErrorCode":0,
"LastUpdateTime":132566544815012784
},
"ICSDHCPFlags":0,
"ICSFlags":0,
"ID":"F909E3B7-1190-4B71-8B41-D0A7CC82271D",
"IsPolicy":false,
"Prefix":20,
"PrivateInterfaceGUID":"CDC07DB2-D173-4CF5-A3FC-853E94C5564B",
"State":3,
"SubnetIPAddress":"192.168.192.0",
"Tag":"ICS"
}
],
"CompartmentOperationTime":0,
"Flags":0,
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566544250681095
},
"ID":"9C610DD8-5465-477F-A903-165BBDC1CFF4",
"PortOperationTime":0,
"State":1,
"SwitchOperationTime":0,
"VfpOperationTime":0,
"parentId":"8AEC6FBD-6F74-4531-9A79-DA257EECB15F"
}
}
{
"ID":"8331509b-4d74-403b-93dd-433e532b3579",
"Name":"Ethernet",
"Version":47244640266,
"AdditionalParams":{
"SwitchId":"7C946C8A-0542-4658-96A2-3AEA4963E5B6",
"SwitchPortId":"2F27A9CF-A05D-4F6D-8D41-E8FAE60A6EDC"
},
"State":2,
"VirtualNetwork":"b95d0c5e-57d4-412b-b571-18a81a16e005",
"VirtualNetworkName":"WSL",
"MacAddress":"00-15-5D-FD-A4-D0",
"IPAddress":"192.168.194.161",
"PrefixLength":20,
"GatewayAddress":"192.168.192.1",
"IPSubnetId":"6dbe631e-1559-46b8-a34d-77ac0aa8f38f",
"DNSServerList":"192.168.192.1",
"SharedContainers":[
],
"VirtualMachine":"D817CAAE-8082-4860-8FB0-E469E8981750"
}
{
"ActivityId":"E637FE52-EFBD-4011-8962-068A5B1DE91E",
"AdditionalParams":{
},
"CompartmentGuid":"B1062982-2B18-4B4F-B3D5-A78DDB9CDD49",
"CompartmentId":1,
"Containers":[
],
"Flags":0,
"Health":{
"LastErrorCode":0,
"LastUpdateTime":132566543725257187
},
"ID":"910F7D92-BA2D-4C3F-98AE-7C0AC590D2DC",
"IsDefault":true,
"Policies":[
],
"State":1,
"Version":47244640266
}
Routing table:
===========================================================================
Interface List
6...........................Wintun Userspace Tunnel
12...0a 00 27 00 00 0c ......VirtualBox Host-Only Ethernet Adapter
19...0a 00 27 00 00 13 ......VirtualBox Host-Only Ethernet Adapter #2
20...54 8d 5a 58 15 74 ......Intel(R) Wireless-AC 9260 160MHz
5...54 8d 5a 58 15 75 ......Microsoft Wi-Fi Direct Virtual Adapter
15...56 8d 5a 58 15 74 ......Microsoft Wi-Fi Direct Virtual Adapter #2
22...2c f0 5d 08 f9 8c ......Intel(R) I211 Gigabit Network Connection
10...54 8d 5a 58 15 78 ......Bluetooth Device (Personal Area Network)
1...........................Software Loopback Interface 1
60...00 15 5d 9b d7 be ......Hyper-V Virtual Ethernet Adapter
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.109 35
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 On-link 192.168.0.109 291
192.168.0.109 255.255.255.255 On-link 192.168.0.109 291
192.168.0.255 255.255.255.255 On-link 192.168.0.109 291
192.168.56.0 255.255.255.0 On-link 192.168.56.1 281
192.168.56.1 255.255.255.255 On-link 192.168.56.1 281
192.168.56.255 255.255.255.255 On-link 192.168.56.1 281
192.168.113.0 255.255.255.0 On-link 192.168.113.2 281
192.168.113.2 255.255.255.255 On-link 192.168.113.2 281
192.168.113.255 255.255.255.255 On-link 192.168.113.2 281
192.168.192.0 255.255.240.0 On-link 192.168.192.1 5256
192.168.192.1 255.255.255.255 On-link 192.168.192.1 5256
192.168.207.255 255.255.255.255 On-link 192.168.192.1 5256
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.56.1 281
224.0.0.0 240.0.0.0 On-link 192.168.113.2 281
224.0.0.0 240.0.0.0 On-link 192.168.0.109 291
224.0.0.0 240.0.0.0 On-link 192.168.192.1 5256
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.56.1 281
255.255.255.255 255.255.255.255 On-link 192.168.113.2 281
255.255.255.255 255.255.255.255 On-link 192.168.0.109 291
255.255.255.255 255.255.255.255 On-link 192.168.192.1 5256
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
1 331 ::1/128 On-link
12 281 fe80::/64 On-link
19 281 fe80::/64 On-link
22 291 fe80::/64 On-link
60 5256 fe80::/64 On-link
22 291 fe80::687e:90ff:89d8:db61/128
On-link
19 281 fe80::95cc:7b8b:b928:5f3/128
On-link
60 5256 fe80::b556:eb4c:bed7:d8c0/128
On-link
12 281 fe80::f148:317a:100a:2eb0/128
On-link
1 331 ff00::/8 On-link
12 281 ff00::/8 On-link
19 281 ff00::/8 On-link
22 291 ff00::/8 On-link
60 5256 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
Deleting HNS network
The LxssManager service is stopping.
The LxssManager service was stopped successfully.
Name : HnsPacketCapture
CaptureMode : SaveToFile
LocalFilePath : C:\Users\rough\AppData\Local\Temp\WSL\diagnostics\\packets.etl
MaxFileSize : 250 MB
TraceBufferSize : 0 KB
MaxNumberOfBuffers : 0
SessionStatus : NotRunning
Name : Microsoft-Windows-NDIS-PacketCapture
SessionName : HnsPacketCapture
Level : 5
MatchAnyKeyword : 0xFFFFFFFFFFFFFFFF
MatchAllKeyword : 0x0
CaptureType : BothPhysicalAndSwitch
VmCaptureDirection : IngressAndEgress
MultiLayer : False
LinkLayerAddress : {}
EtherType : {}
IpAddresses : {}
IpProtocols : {}
TruncationLength : 128
+ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
+ uname -a
Linux Dark-Matter 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
+ ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a2:a1:9b:08:cf:5a brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 5a:1f:c5:7b:9d:4b brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:15:5d:aa:dd:8c brd ff:ff:ff:ff:ff:ff
5: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
+ ip route show
Error: ipv4: FIB table does not exist.
Dump terminated
++ ip route show
++ awk '/default/ { print $3 }'
Error: ipv4: FIB table does not exist.
Dump terminated
+ gateway=
+ '[' 0 '!=' 0 ']'
+ ping -c 4 ''
ping: : Name or service not known
+ ping -c 4 1.1.1.1
ping: connect: Network is unreachable
+ traceroute 1.1.1.1
bash: line 24: traceroute: command not found
+ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.24.16.1
+ which curl
+ curl -m 5 -v https://microsoft.com
* Could not resolve host: microsoft.com
* Closing connection 0
curl: (6) Could not resolve host: microsoft.com
.etl files https://1drv.ms/u/s!AlCFqhnls7MDj6Bc8YySIxSxrTWLbA?e=fI0ddK
dev@Dark-Matter:~$ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 192.168.192.1
dev@Dark-Matter:~$
@IainCoSource: That makes sense, I can see that your adapter has no ip address, so it's a different issue.
@OneBlue any luck with my version of the issue yet?
UPDATE: So funny story, I was prowling random threads on GitHub hoping to find something useful and came across this post by @EvoPulseGaming. With nothing to lose, I decided to try their fix and see what happened.
Here is exactly what I did, in this order:
1). Open PowerShell in administrator mode and run wsl-shutdown
(I knew it worked because Docker Desktop threw an error message).
2). Run compact /u %temp% /i /Q
(In my case, the printout stated that no files had been de-compressed).
3). Open Device Manager and delete the following Network Adapters.
Hyper-V Virtual Ethernet Adapter
Hyper-V Virtual Ethernet Adapter #2
Hyper-V Virtual Ethernet Adapter #3
Restart-Computer
And now, magically, WSL2 is running perfectly, even after multiple reboots...
🙄😳💀
Hope this helps! If anything else happens I'll keep you all posted.
Microsoft Windows [Version 10.0.19042.746] Ubuntu 20.04 LTS 4.19.104-microsoft-standard
I just hit this after a reboot - my Intel WLAN driver did update as part of that reboot which may be pertinent. I followed @killshot13's steps above (which ultimately for me was mostly just deleting the virtual ethernet adapter and restarting) and that seems to have fixed the issue.
Windows 10 Pro 2004 build 19041.804 WSL-2 Ubuntu 18.04.5 LTS
The issue came back for me after the last Windows update... a recurring theme.
Inspired by the @killshot13 and @wmhartl comment, I simply did:
It fixed the issue.
This seems to be a fix, but we need something more bullet proof.
I cant delete any Network Adapter as I dont have admin rights, but I also have the same problems as you.
WSL2 and Docker are my choice for developing and it doesnt work in our VPN since they had to change the MTU value of the VPN because people with DS-Light were having problems connecting to the VPN.
There are so many issues with exactly the same problem sind early 2020 and even in the pandemic time Microsoft is not willing to fix this. YES, during the pandemic time there are more people having this issue, because almost all of them work through VPN.
I was having this issue with a Realtek ethernet controller and WSL2 (with a Windows docker installed). A windows update has now fixed my issue (updated Windows to 20H2 as well as the ethernet driver from Windows update).
@killshot13 I tried your fix but that did not resolve the issue. I noticed the two network adapters came back after reboot. Is that expected?
@cmamigonian
Yes, two will come back, that is fine and perfectly normal. One of the system checks run by the Windows 10 bootloader on start/restart looks for any missing drivers and reinstalls them.
Have you checked your ~/.wslconfig
file yet? Since performing the fix I described above and you referenced earlier, I at some point stripped most of the logic from that file and made it very barebones.
Here is the ~/.wsl_config
file as it exists locally in my settings today...
[wsl2]
swap=0
~@killshot13 Is that in the Linux home path or on Windows?~ nevermind, on Windows. I'll try and see if that works.
ya that didn't fix it for me. still getting Temporary failure in name resolution
.
@cmamigonian
Are you on a vpn?
@K2ouMais I am, yeah.
That is Windows HOMEPATH. Mine was in the C:/Users/%USERPROFILE% as a single config file.
Ooh, that could be the problem. Try turning that VPN off, or if you cannot, try connecting the computer you are using to a personal hotspot or some other alternative Internet source and see if anything changes.
@K2ouMais I am, yeah.
Till today I couldnt get a workaround for using my WSL2 when on VPN.
I dont have any admin rights on my PC and so I never could fix it.
It is still a problem for me.
I was having the same problems, but I fixed it by updating my /etc/resolv.conf to use my company given VPN DNS rather than automatic generation, or googles.
Environment
Steps to reproduce
sudo apt update
WSL logs:
Expected behavior
connect to linux archives and fetch the updates
Actual behavior