-
Notifications
You must be signed in to change notification settings - Fork 822
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
Querying ${hostname}.local
takes forever due to DNS server that is built into WSL
#12080
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! Open similar issues:
Closed similar issues:
|
Diagnostic information
|
hello. thanks for reporting the issue. can you please try either of the following 2 solutions documented at https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#resolve-local-names-in-wsl and let us know if those resolve the issue?
|
@CatalinFetoiu thank you for your reply! Setting However, by setting But I must admit that 1 second is still quite slow comparing to the results I'm getting with using any custom DNS server (e.g. $ 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.28.0.1
$ time getent hosts ${hostname}.local
172.28.0.1 egor-bychin-pc.local
________________________________________________________
Executed in 1.05 secs fish external
usr time 2.32 millis 0.00 micros 2.32 millis
sys time 0.43 millis 435.00 micros 0.00 millis $ cat /etc/resolv.conf
nameserver 1.1.1.1
$ time getent hosts ${hostname}.local
172.28.0.1 egor-bychin-pc.local
________________________________________________________
Executed in 116.05 millis fish external
usr time 1.95 millis 89.00 micros 1.86 millis
sys time 0.35 millis 355.00 micros 0.00 millis I think the results may still be greatly improved by some changes on your side |
@sigasigasiga thanks for following up for the case where you see a 1 second delay, could you please collect new networking logs (WslNetworkingLogs) ? |
I actually have a newer version of WSL
And the domain still resolves in 10 seconds with
Yes, I got that right from the start: I've done the first test with
and the second one with
Okay, here's the logs collected from the machine with |
Diagnostic information
|
@sigasigasiga thanks for sending logs sorry for the confusion about the WSL build number, I meant to say any build that is 2.3.17 or higher could you please also collect networkings logs from the mirrored networking case? We should understand why resolution takes 10 seconds there |
Diagnostic information
|
Windows Version
Microsoft Windows [Version 10.0.22631.4169]
WSL Version
2.2.4.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.153.1-microsoft-standard-WSL2
Distro Version
Any, I guess. The bug reproduces on Ubuntu 23.04 and on openSUSE Tumbleweed 20240923
Other Software
on my openSUSE Tumbleweed machine:
avahi-daemon 0.8
libnss-mdns 0.15.1-1.5
systemd 256.5-1.1
Repro Steps
However, if I change my DNS server in
/etc/resolv.conf
, then everything is super fast:Expected Behavior
I get the results in 10 seconds
Actual Behavior
I get the results in 0.00001 seconds
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: