DNS Resolution not working on Windows build 22533.1001
Version
Microsoft Windows [Version 10.0.22533.1001]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
Linux version 5.10.74.3-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Mon Oct 18 19:27:44 UTC 2021
Distro Version
Fedora Release 35
Other Software
No response
Repro Steps
do anything needing hostname resolution.
`Errors during downloading metadata for repository 'copr:copr.fedorainfracloud.org:wslutilities:wslu':
- Curl error (6): Couldn't resolve host name for https://download.copr.fedorainfracloud.org/results/wslutilities/wslu/fedora-35-x86_64/repodata/repomd.xml [Could not resolve host: download.copr.fedorainfracloud.org] Error: Failed to download metadata for repo 'copr:copr.fedorainfracloud.org:wslutilities:wslu': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried`
Expected Behavior
Actually do hostname resolution
Actual Behavior
After a timeout, an error - couldn't resolve. Commands ran as root or as normal user.
Diagnostic Logs
No response
the issue appeared after the Windows update to version 10.0.22533.1001.
Same problem here but still on build 22523. First noticed the issue yesterday when I couldn't rebuild a devcontainer in VS Code, but all lookups appear to fail.
$ sudo apt update
Err:1 http://archive.ubuntu.com/ubuntu hirsute InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:3 https://download.docker.com/linux/ubuntu hirsute InRelease
Temporary failure resolving 'download.docker.com'
Update: a reboot did not fix it, but installing build 22533 did.
Update: a reboot did not fix it, but installing build 22533 did.
For me this happened on the first reboot after installing 22533 - but a reboot later it was fixed. I'm waiting for a comment from the devs, I also sent a full set of logs to the support team, maybe they can identify the issue.
The issue came back with build 22543 and it persists even after multiple reboots. ~~The network adapter seems to be broken or missing. ipconfig lists an entry with Ethernet adapter vEthernet (WSL) but Get-NetAdapter doesn't list it.~~
I started having this issue today out of nowhere. No updates or changes since yesterday when it was working alright. Build 22000.588.
➜ ping google.com
ping: google.com: Temporary failure in name resolution
I've finally pinned down the cause for my issue. It's Windows Defender Firewall, as mentioned in #4285, #5256, #4139 and others. Disabling the firewall or adding a (temporarily working) rule with New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow lets DNS resolution work again.
I'm also seeing the many DNS rules just like the commenter at https://github.com/microsoft/WSL/issues/4285#issuecomment-595221870 which may be related to the problem.
Edit: I've created #8236 with steps to reliably fix and reproduce my specific issue.
After a slow ring update to 22598.1 I started seeing this issue with DNS resolution in my WSL 2 environment. The above firewall rule addition allowed DNS to function again.
Other windows networking resets and fixes as mentioned in these threads did not help.
I'm not seeing any incoming DNS firewall rules being created, unlike above poster and linked comment.
I do have Hyper-V and Docker Desktop installed and running.
/dupe #8365
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.
Thanks for your report!