Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Docker for windows DNS is not accessible.

Hi,

A month ago my Windows VM stopped reaching gitlab (it's a runner). When I connected and looked at it closer, it turned out that none of the network resources were available. Here is the output of the command below

PS> docker run -it --rm mcr.microsoft.com/powershell:7.3-nanoserver-1809 ping google.com
Ping request could not find host google.com. Please check the name and try again. PS

I've found another similar problem, but the machine type is C2D, not C3, and switching to E2 didn't work either. 

By the way, if I change the google.com address to its IP 172.217.18.14, I get the response

PS> docker run -it --rm mcr.microsoft.com/powershell:7.3-nanoserver-1809 ping 172.217.18.14

Pinging 172.217.18.14 with 32 bytes of data:
Reply from 172.217.18.14: bytes=32 time=111ms TTL=113
Reply from 172.217.18.14: bytes=32 time=110ms TTL=113
Reply from 172.217.18.14: bytes=32 time=110ms TTL=113
Reply from 172.217.18.14: bytes=32 time=110ms TTL=113

Ping statistics for 172.217.18.14:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 110ms, Maximum = 111ms, Average = 110ms

There is no extra configuration of the VM, just the default one.

Have no idea where to start. Think of temporarily running the VM in another cloud 😥

Everything worked fine for about a year, but now I'm desperate to fix it

Thank you

Solved Solved
1 2 1,613
1 ACCEPTED SOLUTION

@VannGuce thank you for your response!

Your message reminded me of configuring a global docker network's DNS, but I couldn't make it work as the docker for Windows container's configuration is a bit tricky.

However, as a workaround, I was able to change my runner configuration to start all containers providing the "8.8.8.8" DNS and it worked!

Anyway, the behavior when the newly created "Windows server for containers" VM cannot reach any external resource, as the DNS is broken, doesn't seem like something correct

Thank you a lot!

View solution in original post

2 REPLIES 2

VannGuce
Former Googler

Hi,

Aside from the ping test, is there another troubleshooting step that you already performed to resolve this concern? To diagnose this concern I suggest the following information below:

Check if you can reach your DNS server through the ping test.
Try to use a different DNS public server[1] like Google. This is to isolate the issue if it will work using a different DNS server.
Update network drivers or reinstall if necessary make sure its up to date.
Check the logs of your DNS server

You can also check this link[2] and use it as a guide to troubleshoot your DNS server.


[1]https://developers.google.com/speed/public-dns/docs/using
[2]https://learn.microsoft.com/en-us/windows-server/networking/dns/troubleshoot/troubleshoot-dns-server

@VannGuce thank you for your response!

Your message reminded me of configuring a global docker network's DNS, but I couldn't make it work as the docker for Windows container's configuration is a bit tricky.

However, as a workaround, I was able to change my runner configuration to start all containers providing the "8.8.8.8" DNS and it worked!

Anyway, the behavior when the newly created "Windows server for containers" VM cannot reach any external resource, as the DNS is broken, doesn't seem like something correct

Thank you a lot!