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

Temporary Failure in Name Resolution With Docker #11445

Closed
1 of 2 tasks
aldobarr opened this issue Apr 10, 2024 · 13 comments
Closed
1 of 2 tasks

Temporary Failure in Name Resolution With Docker #11445

aldobarr opened this issue Apr 10, 2024 · 13 comments

Comments

@aldobarr
Copy link

aldobarr commented Apr 10, 2024

Windows Version

Microsoft Windows [Version 10.0.19045.4170]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04.4

Other Software

Docker Desktop (Windows), version 4.29.0 with WSL 2 backend and integration with the distro

Repro Steps

  1. Open WSL Distro
  2. Open docker desktop and give it a few seconds to initialize and all that.
  3. run ping google.com from the wsl terminal.

Expected Behavior

I should get something along the lines of:

$ ping google.com
PING google.com (142.250.189.142) 56(84) bytes of data.
64 bytes from mia09s26-in-f14.1e100.net (142.250.189.142): icmp_seq=1 ttl=116 time=5.39 ms

Actual Behavior

$ ping google.com
ping: google.com: Temporary failure in name resolution

Diagnostic Logs

Copy link

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.

Diagnostic information
.wslconfig found
Detected appx version: 2.1.5.0

@aldobarr
Copy link
Author

Networking works fine until docker desktop is ran on windows. After running docker desktop hostname resolution fails for the rest of the WSL session. Quitting docker does not restore hostname resolution. Only thing that works is wsl --shutdown and then re-opening the WSL instance. Of course, as soon as I run docker desktop again hostname resolution will resume failing.

@aldobarr
Copy link
Author

Okay so I've been holding off on setting generateResolvConf = false and manually setting my nameserver because I would rather let WSL take care of that. I think that would also kill some interconnectivity between ubuntu and the windows host? Either way I just tried it.

Before and after opening docker:
image

@aldobarr
Copy link
Author

aldobarr commented Apr 17, 2024

While previous attempts at setting the "bip" setting in docker engine to something like "bip": "192.168.200.1/24" as found in solutions such as this one:
https://stackoverflow.com/questions/65426891/networking-problems-with-wsl2-and-docker-desktop-for-windows/73287366#73287366

Had not worked, giving me issues like telling me "bip" must be an ipv4 address and even if I force the change in the daemon.json file myself it just didn't really resolve the issue. Today, I downgraded docker desktop to 4.24.0. Afterwards I was able to edit "bip" from docker engine in the app itself without the error. After setting bip dns in WSL is working again.

Copy link

Diagnostic information
Found '/question', adding tag 'question'

@chanpreetdhanjal
Copy link

Hi. Can you please collect networking logs by following the instructions below?
https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

@aldobarr
Copy link
Author

aldobarr commented May 2, 2024

Hi. Can you please collect networking logs by following the instructions below? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

So, I had downgraded docker desktop to v4.24.2 and set BIP in docker engine to something as a workaround. v4.24.2 is the latest version I was able to get working without docker killing my networking.

In order to get the logs, I upgraded to 4.29.0 from the docker application. However, despite upgrading and running the new version. I was unable to reproduce the issue. I even removed BIP setting from docker engine. Restarted the app multiple times etc. Still no issue.

Then I completely uninstalled docker desktop and re-installed v4.29.0 from scratch. After which the issue returned as described above. I had the network log script running the whole time until the issue was reproduced. Logs attached.

Copy link

github-actions bot commented May 2, 2024

Diagnostic information
.wslconfig found
Detected appx version: 2.1.5.0
Detected user visible error: Wsl/Service/WSL_E_DISTRO_NOT_FOUND

@chanpreetdhanjal
Copy link

Please follow the networking diagnostic script. https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

It should create a folder like [WslNetworkingLogs-date_ver.zip]

@aldobarr
Copy link
Author

aldobarr commented May 3, 2024

Please follow the networking diagnostic script. https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues

It should create a folder like [WslNetworkingLogs-date_ver.zip]

Sorry must have c+p'd the script just below it.

Oddly enough, the moment I run the script it kills my name resolution before I even have a chance to open docker. See logs and video

@aldobarr
Copy link
Author

aldobarr commented May 3, 2024

For what it's worth, I was on version 2.0.something of WSL when I installed docker and began experiencing this issue. I tried updating WSL (which put me on 2.1.5 as I currently am on now) and I also tried turning WSL off in windows features and then turning it back on which also did not help.

@aldobarr
Copy link
Author

aldobarr commented May 7, 2024

Okay so incidentally I'm seeing now any time I run my "default" WSL instance, it starts with no ability to resolve DNS hostnames at all. No matter what I do the default Ubuntu install will not be able to resolve hostnames. If I then run wsl --shutdown and open my secondary ubuntu distro (the one I use for work) it works fine until I open up my default one. At that point the secondary one's ability to resolve hostnames is gone and the default one comes in without any ability to do so from the start.

@aldobarr
Copy link
Author

Deleting my default WSL instance and remaking it seems to have solved the issue for now.

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

No branches or pull requests

3 participants