Install n8n docker get error: getaddrinfo EAI_AGAIN ph.n8n.io

Describe the problem/error/question

After download n8n docker image, got error when running it.
It shows “Error: getaddrinfo EAI_AGAIN ph.n8n.io”, but I can Ping this domain ph.n8n.io.(Work in host env, not work inside of docker)
I restart the docker and even remove all and reinstall it, still not work.
The default web site (http://localhost:5678/variables) I can access but can’t get activation key due to error decribe above.
I install n8n with steps:
docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n docker.n8n.io/n8nio/n8n
Anyone met this before? Please help.

Information

  • **Operating system: windowns 11 with wsl2

Debug info

core

  • n8nVersion: 1.86.0
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.3
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: community
  • consumerId: unknown

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/135.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-04-09T06:55:12.286Z
[/details]

Hi,

its not only the ph,n8n.io that its not working, the telemetry as well. So it seems to be a general issue.

Does it happen continuously or randomly?

Just to confirm when you say DNS lookup is working to ph.n8n.io (you are trying to perform the lookup from inside the running container and not just on the host?)

Also i searched google to see if there are any known issues:

there are many like these so i don’t know.

regards
J.

Yes, it is not only for ph, but also telemetry, enterprise and etc, and continuously.
DNS lookup only work in host for these domain, not work inside of docker

could you try to append --dns 8.8.8.8 to your container start? this is one of the public google DNS servers.

Are you running anything special on your computer? VPN? FW? Another other that might prevent the container to use the DNS from the host or lead it somewhere else?

2 Likes

Thank you so much, you save me a lot.
Do you know how does this happen?

Hi, not sure tbh. in normal circumstances the docker instance should takeover the dns settings from the host and it should work without any problems (i never encountered any issues tbh). with vpn/fw i have seen issues with some things so i guessed it would be something like this… im happy its resolved but who knows. maybe someone else has a clue. anyway i was lucky that my test procedure turned out a solution :slight_smile:

1 Like

Thank you again, I spent almost 4 hours to deal with this. I am new to docker. You are right that I have vpn because my country has a firewall that stop us accessing the internet outside. Btw, where are you from?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.