-
Notifications
You must be signed in to change notification settings - Fork 837
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
Getting DNS errors on latest WSL pre-release #11382
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 scipt will output the path of the log file once done. 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! Open similar issues:
Closed similar issues:
|
@marcmv1 are you using networking mirrored mode or NAT? And if you disable
On Win10 |
@CatalinFetoiu - can you please investigate? |
I don't know why cmd gave me windows 10 LOL. I'm on Windows 11 23H2 OS build 22631.3296. Here's the output with dnsTunneling=false in .wslconfig host www.microsoft.com |
@marcmv1 thanks for reporting the issue can you please collecting networking logs using instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues the script will generate a file with name starting with "WslNetworkingLogs" |
I was also having issues after updating to the 2.2.1 pre-release version. Some web requests were working but others failing with network issues. I've now resolved the issues and have DNS tunneling and network mirroring working. Here's what I did. Changes to global WSL config... # .wslconfig
[wsl2]
networkingMode = mirrored
dnsTunneling = true
# ... Changes in my Ubuntu 22.04 distro... # /etc/wsl.conf
[network]
generateHosts = false
generateResolvConf = false
# ... Reset the 127.0.0.1 localhost
127.0.1.1 myhostname
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters Reset the nameserver 8.8.8.8 After running Hope this can help someone else! |
Just FYI, I have been experiencing the same as the above in the latest release (no longer pre-release) and this broke a lot of networking in my environment. Specifically, I wasn't able to push any docker images upstream to an ECR repo. Other network requests, even resolving the hostname and logging in were working with success. I did the above from (@chrisk314) and that got me working again. |
@chrisk314 thank you for describing the workaround. In my setup, I only needed to make these changes:
The other settings ( There is one drawback of this configuration: If you use your device both in private networks (with private DNS resolvers) and in public networks, you need to switch the nameserver manually each time. With regards to the bug itself: In my setup, it only (or mainly?) occurs with DNS queries for records that do not exist (e.g. the AAAA record for a service that only has an A record). With one Wireshark in the WSL; and one Wireshark in Windows, I see that while the WSL only makes one query to Windows, Windows expands this into multiple queries, the original one plus one for each search domain. It looks like Windows then responds with one of the search domain answers, which does not match the WSL query. It's worth noting that the generated Btw. I also tried
while keeping |
Disabling dnsTunneling did the trick for me:
|
this worked for me . |
Does anyone have an idea which circumstances cause this issue to appear in the first place? It has only received two thumbs-up, and Microsoft has ignored if for half a year now, so I guess it does not affect most people. I assume some kind of relationship with search domains, see my earlier comment, but even when I disabled search domains, I still get malformed DNS responses from (it includes an |
@CatalinFetoiu (since you're assigned to this issue) - if there is a way I could help you to investigate this issue, e.g. by testing out settings, providing logs or network captures, I'd be glad to do so. |
thanks @Yogu . can you please collect networking logs using instructions at https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues ? since the problem is related to dnsTunneling, please make sure to have it enabled before reproducing the issue (and also have generateResolvConf=true, since that is required for dnsTunneling to be successfully enabled) |
It worked for me. you save my day |
Windows Version
Microsoft Windows [Version 10.0.22631.3296]
WSL Version
2.2.1.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.150.1-microsoft-standard-WSL2 #1 SMP Thu Mar 7 03:22:57 UTC 2024 x86_64 GNU/Linux
Distro Version
Fedora 39
Other Software
N/A
Repro Steps
host is returning too much info and appending the entries from domain search listed in /etc/resolv.conf
host www.microsoft.com
www.microsoft.com is an alias for www.microsoft.com-c-3.edgekey.net.
www.microsoft.com-c-3.edgekey.net is an alias for www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net.
www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net is an alias for e13678.dscb.akamaiedge.net.
e13678.dscb.akamaiedge.net has address 23.197.181.184
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:198::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:182::356e
;; ;; Question section mismatch: got e13678.dscb.akamaiedge.net.random.com/MX/IN
;; communications error to 10.255.255.254#53: timed out
;; ;; Question section mismatch: got e13678.dscb.akamaiedge.net.random.com/MX/IN
;; communications error to 10.255.255.254#53: timed out
;; no servers could be reached
When I do host followed by a DNS server, output is as it should be
host www.microsoft.com 1.1.1.1
Using domain server:
Name: 1.1.1.1
Address: 1.1.1.1#53
Aliases:
www.microsoft.com is an alias for www.microsoft.com-c-3.edgekey.net.
www.microsoft.com-c-3.edgekey.net is an alias for www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net.
www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net is an alias for e13678.dscb.akamaiedge.net.
e13678.dscb.akamaiedge.net has address 23.197.181.184
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:198::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:182::356e
Expected Behavior
This is how it should look
host www.microsoft.com 1.1.1.1
Using domain server:
Name: 1.1.1.1
Address: 1.1.1.1#53
Aliases:
www.microsoft.com is an alias for www.microsoft.com-c-3.edgekey.net.
www.microsoft.com-c-3.edgekey.net is an alias for www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net.
www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net is an alias for e13678.dscb.akamaiedge.net.
e13678.dscb.akamaiedge.net has address 23.197.181.184
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:198::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:182::356e
Actual Behavior
This is how it does look
host www.microsoft.com
www.microsoft.com is an alias for www.microsoft.com-c-3.edgekey.net.
www.microsoft.com-c-3.edgekey.net is an alias for www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net.
www.microsoft.com-c-3.edgekey.net.globalredir.akadns.net is an alias for e13678.dscb.akamaiedge.net.
e13678.dscb.akamaiedge.net has address 23.197.181.184
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:198::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:2000:182::356e
;; ;; Question section mismatch: got e13678.dscb.akamaiedge.net.random.com/MX/IN
;; communications error to 10.255.255.254#53: timed out
;; ;; Question section mismatch: got e13678.dscb.akamaiedge.net.random.com/MX/IN
;; communications error to 10.255.255.254#53: timed out
;; no servers could be reached
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: