Docker Community Forums

Share and learn in the Docker community.

Docker fails to perform name resolution


(Michaelloewenstein) #1

Hi,

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 “ourdatabase.cw.us-east-1.redshift.amazonaws.com” 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.

Thanks


(Evan) #2

Greetings…

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.


(Michaelloewenstein) #3

Hey,

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


(Michaelloewenstein) #4

This keeps happening…

Unable to find image ‘ubuntu:latest’ locally
Pulling repository ubuntu
Get https://index.docker.io/v1/repositories/library/ubuntu/images: dial tcp: lookup index.docker.io on 172.17.17.3:53: read udp 172.17.17.3:53: i/o timeout

I solve this by recreating a new docker-machine


(Giblix) #5

Hi,
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 https://index.docker.io/v1/repositories/COMPANY/REPO/images: dial tcp: lookup index.docker.io: 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…


(Chilon) #6

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


(Chilon) #7

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


(Nurtureai) #8

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


(Patiponp202) #9

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