Skip to content
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

Open
1 of 2 tasks
marcmv1 opened this issue Mar 26, 2024 · 6 comments
Open
1 of 2 tasks

Getting DNS errors on latest WSL pre-release #11382

marcmv1 opened this issue Mar 26, 2024 · 6 comments
Assignees
Labels

Comments

@marcmv1
Copy link

marcmv1 commented Mar 26, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3296]

WSL Version

2.2.1.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

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

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

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
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please 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:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@zcobol
Copy link

zcobol commented Mar 26, 2024

@marcmv1 are you using networking mirrored mode or NAT? And if you disable dnsTunneling does it make any difference? On Windows 10 and WSL 2.2.1.0 it works as you expected:

[zcobol@toto ~]$ 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.102.50
e13678.dscb.akamaiedge.net has IPv6 address 2600:1405:1800:18c::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1405:1800:195::356e

[zcobol@toto ~]$ 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.102.50
e13678.dscb.akamaiedge.net has IPv6 address 2600:1405:1800:195::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1405:1800:18c::356e

On Win10 networkingMode = mirrored is not available.

@benhillis
Copy link
Member

@CatalinFetoiu - can you please investigate?

@marcmv1
Copy link
Author

marcmv1 commented Mar 27, 2024

@zcobol,

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
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:4000:591::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:4000:58e::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:4000:58c::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:4000:58f::356e
e13678.dscb.akamaiedge.net has IPv6 address 2600:1401:4000:58d::356e

@CatalinFetoiu
Copy link
Collaborator

@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"

@chrisk314
Copy link

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 /etc/hosts entries in my Ubuntu 22.04 distro (myhostname is a placeholder)...

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 /etc/resolv.conf entries in my Ubuntu 22.04 distro...

nameserver 8.8.8.8

After running wsl.exe --shutdown and then restarting my Ubuntu 22.04 distro everything seems to be working correctly as far as I can tell. I'm able to successfully curl a service running on my Windows localhost from a shell inside Ubuntu. I can also successfully make web requests from inside Ubuntu now. Earlier in the day a terraform apply was consistently failing after the update to 2.2.1, now it's all good!

Hope this can help someone else!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants