-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
DNS queries inside docker fail with Error: getaddrinfo EAI_AGAIN #32106
Comments
Please provide the requested information about the version and config of
Docker.
…On 25 Mar 2017 09:15, "Trond Kandal" ***@***.***> wrote:
We are using Bamboo to build a complete docker container with a NodeJS
application.
During building the docker is started and npm is used to download all the
depending
frameworks. The build fails because it seems like some of the DNS queries
fail with
getaddrinfo EAI_AGAIN registry.npmjs.org:443
Has anyone experienced the same problem?
...
25-mar-2017 09:06:14 npm info using ***@***.***
25-mar-2017 09:06:14 npm info using ***@***.***
...
25-mar-2017 09:07:24 npm info retry will retry, error on last attempt: Error: getaddrinfo EAI_AGAIN registry.npmjs.org:443
...
25-mar-2017 09:08:24 npm http request GET https://registry.npmjs.org/supertest
25-mar-2017 <https://registry.npmjs.org/supertest25-mar-2017> 09:08:29 npm ERR! Linux 4.4.0-66-generic
25-mar-2017 09:08:29 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
25-mar-2017 09:08:29 npm ERR! node v6.9.5
25-mar-2017 09:08:29 npm ERR! npm v3.10.10
25-mar-2017 09:08:29 npm ERR! code EAI_AGAIN
25-mar-2017 09:08:29 npm ERR! errno EAI_AGAIN
25-mar-2017 09:08:29 npm ERR! syscall getaddrinfo
25-mar-2017 09:08:29
25-mar-2017 09:08:29 npm ERR! getaddrinfo EAI_AGAIN registry.npmjs.org:443
25-mar-2017 09:08:29 npm ERR!
25-mar-2017 09:08:29 npm ERR! If you need help, you may report this error at:
25-mar-2017 09:08:29 npm ERR! <https://github.com/npm/npm/issues>
25-mar-2017 09:08:29
25-mar-2017 09:08:29 npm ERR! Please include the following file with any support request:
25-mar-2017 09:08:29 npm ERR! /app/npm-debug.log
25-mar-2017 09:08:29 The command '/bin/sh -c npm install' returned a non-zero code: 1
25-mar-2017 09:08:29
...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#32106>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAdcPBXZpEUMhS_zl0nv5FgelDSZdcSrks5rpNstgaJpZM4MpBKC>
.
|
Ignore this problem. |
The server was patched without my knowledge and the patching modified /etc/sysctl.conf. |
This known issue is discussed in detail here: https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/ Simple fix is to create the file and insert:
where |
For me it helped to run "docker-compose up -d" again. The problem was the old docker instance was created in a different session with a different wifi network etc. |
If you are using VPN and docker has problems with DNS try:
This worked for me. |
Didn't work for me. The DNS in /etc/resolv.conf comes from DHCP and is managed by the cloud service provider. It doesn't/wouldn't contain the DNS records of docker containers. When I did I tried Restarting the container solved the problem. |
In my case removing |
So I have multiple Docker images using NodeJS (based on I would like to solve this problem once and for all. My guess is there is a network dependency issue in Docker or within NodeJS docker image. Either way maybe the app in the docker container is trying to access the internet before the network is up? Or!? Help me.. This issue is causing 3 years of brain pain for me. |
@Danger89 The remark from Melroy van den Berg on this Stack Overflow thread can help you : https://stackoverflow.com/a/61955468 |
Who is Melroy? Hahah. Yea it's me. 🤣 |
This, this is what I came here for. Thank you kind sir. |
i can't understanding this issue origin, but works perfectly. thanks! |
We are using Bamboo to build a complete docker container with a NodeJS application.
During building the docker is started and npm is used to download all the depending
frameworks. The build fails because it seems like some of the DNS queries fail with
getaddrinfo EAI_AGAIN registry.npmjs.org:443
Has anyone experienced the same problem?
The text was updated successfully, but these errors were encountered: