[go: up one dir, main page]

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

Querying ${hostname}.local takes forever due to DNS server that is built into WSL #12080

Open
1 of 2 tasks
sigasigasiga opened this issue Sep 25, 2024 · 3 comments
Open
1 of 2 tasks

Comments

@sigasigasiga
Copy link
sigasigasiga commented Sep 25, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.4169]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

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

$ 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 10.255.255.254

$ time getent hosts ${hostname}.local
172.28.0.1      egor-bychin-pc.local

________________________________________________________
Executed in   10.02 secs      fish           external
   usr time    3.26 millis  177.00 micros    3.08 millis
   sys time    0.53 millis  530.00 micros    0.00 millis

However, if I change my DNS server in /etc/resolv.conf, then everything is super fast:

$ cat /etc/resolv.conf
nameserver 1.1.1.1

$ time getent hosts ${hostname}.local
172.28.0.1      egor-bychin-pc.local

________________________________________________________
Executed in   10.55 millis    fish           external
   usr time    1.31 millis   57.00 micros    1.26 millis
   sys time    0.21 millis  210.00 micros    0.00 millis

Expected Behavior

I get the results in 10 seconds

Actual Behavior

I get the results in 0.00001 seconds

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 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
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.

@sigasigasiga
Copy link
Author

Copy link
Diagnostic information
Multiple log files found, using: https://github.com/user-attachments/files/17138533/WslNetworkingLogs-2024-09-26_00-58-02.zip
Detected appx version: 2.2.4.0
optional-components.txt not found

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

No branches or pull requests

1 participant