Docker fails to perform name resolution


We are using Docker-Machine in our team, and receiving a reoccurring issue: docker fails to perform name resolution. The error can arrive in two ways:

  1. We run an application, which tries to connect to a database using a connection string, and get as output the following message:

could not translate host name “” to address: Temporary failure in name resolution

Solution: the only one we came up with is removing the current docker-machine and starting a new one.

  1. Can’t access docker hub, nor any connection to our databases can be establish. Docker outputs it can’t connect to the hub in order to download an image ( and outputs the specific ip it is trying to connect to).

Still haven’t came up with a solid solution, tried removing, stoping both docker-machine and docker, restart the computer etc. After some time it just passes. We think it is not related to our internet connection/ firewall etc since not all developers meet this problem.



Are you changing any DNS settings in the docker engine or containers? I know that Amazon provides its own DNS and if you change from that you won’t be able to do lookups to the internal services.

Since it eventually comes back it sounds like either an upstream DNS issue or perhaps some other network related issue.


I am not changing any settings at all.
BTW, the machine is my local machine, so I don’t think you’r note regarding amazon applies to me. I am working from my workplace’s internet connection, and only some of us are experiencing this problem, while others don’t (we are all under the same internet connection).

This keeps happening…

Unable to find image ‘ubuntu:latest’ locally
Pulling repository ubuntu
Get dial tcp: lookup on read udp i/o timeout

I solve this by recreating a new docker-machine

We are encountering the same issue.
For isntance it happend 9 times in the last 3 hours.
What we experiance is:
The container stoped for some reason (error in code or something) and then the fleetctl start the unit again.
In the unit it asks for the latest image on docker hub.
Then the error in journalctl is:
docker[26369]: Get dial tcp: lookup Temporary failure in name resolution

If this happens and I want to fix it immediately then I restart the docker engine with > sudo systemctl restart docker

Our environment runs on AWS with image CoreOS-stable-766.5.0-hvm (ami-55d20b26).
We did not change the DNS’s anywhere.

This is also an issue because sometime our app states that some of our containers are not available (probably the same issue).
From what we can see so far, it is not related to instance type or AZ in AWS.
The only thing left is the region (Ireland) which we can’t replace.

Anyone have any idea how we can fix it???
@michaelloewenstein, you said you created a new image? Did that fix it?
If so, what was the problem? I mean, I can create a new image but don’t know what is the problem I need to extract from the image…

We just encountered this issue, one machine in our CoreOS cluster stopped being able to pull. Had to systemctl restart docker on it.

Now we’re encountering the bug frequently. It’s extremely inconvenient.

its still happening to date
ive to restart docker every 3 days once

Thanks for the good ideas to bring it. I know a lot more.

Same problem here, our swarm lose its DNS resolution between the two nodes randomly. Any pointers ? We can’t let that bug exist in our production.
Server Version: 19.03.8

my error : Idial tcp: lookup Temporary failure in name resolution

I had the same problem, in my case what I was doing after building my docker image I was uploading to my docker hub account and then I was doing a pull to start the container.**but the problem was at the level of my docker hub which was saturated I had to delete some old version of the docker hub and relaunched ** … everything works now

I don’t know if any of you have solved this, but I have found the cause of error and solution that worked for me.

I had installed AdGuard as docker container and set it as DNS server for my local home network.
It was working fine for some time, however the local server lost its internet access ( I was not able to pull from dockerhub). Even ping to google would give me “Temporary failure in name resolution.”

I pinged to and it seemed to work. So I concluded it is my DNS problem.

I had disabled “systemd-resolved” service (fedora-server 's DNS ). I enabled it and stopped AdGuard container.
And the error was gone.

I guess it is problem with DNS.