-
Notifications
You must be signed in to change notification settings - Fork 832
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
Updating WSL appears to cause generateResolvConf to create only IPv6 nameserver entries, causing DNS resolution to fail. #12191
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
Apparently, a valid solution is to uninstall the WSL application as shown on the screenshot (correlate the uninstall command), keeping only the bottom two installed. Since this started to happen only recently, the WSL application downgrade to version lower than 2.3.24.0 could also fix this issue, however I have not explored this option yet. Also, this could be fixed in a future release after 2.3.24.0 as well. Other than this, while I haven't identified the exact cause of this issue. It seems that WSL always populates with 3 nameservers, the first ones from windows, and if there aren't any more defined in windows, it'll use those IPv6 addresses as shown above. Since the issue was that the entire file was populated only by the IPv6 DNS server addresses, I assume the WSL failed to source or identify which DNS server addresses are being used in windows. It treats it as if there was no DNS defined in windows whatsoever as well. Anyway, I'm closing this since the WSL now appears to work fine without the app installed anyway, and I believe it's for wsl2 only, so this solution is good enough for my use case. |
I am currently experiencing the same issue with the WSL2 distro.
Ubuntu Distro
Generated resolv.conf
WSL Config
NetworkingLogs |
Windows Version
Microsoft Windows 11 Pro for Workstations version 23H2 build 22631.4317
WSL Version
2.3.24.0 (with broken DNS, after running wsl --update) (the WSL with working DNS only shows help text for
--version
)Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 4.4.0-22621-Microsoft ([email protected]) (gcc version 5.4.0 (GCC) ) #3672-Microsoft Fri Jan 01 08:00:00 PST 2016
Distro Version
Ubuntu 22.04
Other Software
Tailscale, zerotier, wireguard, other VPN software. It has never affected WSL in this way and haven't changed during upgrade -> restore from backup troubleshooting process.
Repro Steps
Here's what I did:
Run
wsl.exe --update
as advisedOn the next launch of Ubuntu, the DNS is already not working.
Restoring the entire windows installation to a backup taken before running 'wsl.exe --update' restores the DNS functionality back to normal.
Expected Behavior
I expect DNS entries in /etc/resolv.conf to correspond to DNS servers used by the Windows system.
Example of working config generated by WSL:
Actual Behavior
Broken DNS on multiple computers after upgrade—they all seem to share this same config generated by WSL:
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: