Intermittent getaddrinfo EAI_AGAIN Error in HTTP Request Node on n8n Cloud

Hello!!

Describe the problem/error/question

I’m encountering a getaddrinfo EAI_AGAIN error approximately 1 in 10 times when running a workflow in n8n Cloud. The error occurs in an HTTP Request node trying to connect to www.contraloria.cl. It seems to be a DNS resolution issue, but I’m unsure why it’s happening or how to resolve it in the n8n Cloud environment. The workflow was working fine previously, and the target URL is accessible from my browser.

Has anyone faced this issue in n8n cloud? Any suggestions on how to troubleshoot or resolve it?

What is the error message (if any)?

Error message:

Error: getaddrinfo EAI_AGAIN www.contraloria..cl

Full stack trace:

Error: getaddrinfo EAI_AGAIN www.contraloria..cl
    at Function.AxiosError.from (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/AxiosError.js:92:14)
    at RedirectableRequest.handleRequestError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:620:25)
    at RedirectableRequest.emit (node:events:536:35)
    at ClientRequest.eventHandlers.<computed> (/usr/local/lib/node_modules/n8n/node_modules/follow-redirects/index.js:49:24)
    at ClientRequest.emit (node:events:524:28)
    at emitErrorEvent (node:_http_client:101:11)
    at TLSSocket.socketErrorListener (node:_http_client:504:5)
    at TLSSocket.emit (node:events:524:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
    at Axios.request (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/Axios.js:45:41)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at invokeAxios (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:173:16)
    at proxyRequestToAxios (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:513:26)
    at Object.request (/usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/execution-engine/node-execution-context/utils/request-helper-functions.js:1145:50)

Error code: EAI_AGAIN

Share the output returned by the last node

The HTTP Request node fails (1 of 10 tries) with the error above, so no output is returned.

Information on your n8n setup

  • n8n version: Latest (cloud, unsure of exact version)
  • Database: (Not applicable, using n8n cloud)
  • n8n EXECUTIONS_PROCESS setting: (Not applicable, using n8n cloud)
  • Running n8n via: n8n cloud
  • Operating system: (Not applicable, using n8n cloud)

Additional context:
*The error occurs in about 1 out of 10 tries, and I’ve noticed it over the last 4 days.

  • The workflow is simple, just an HTTP Request node hitting an external API
  • The URL is accessible from my local machine and browser, so the issue seems specific to n8n cloud’s DNS resolution.
  • I’ve tried adding a timeout to the HTTP Request node, but it didn’t help.
  • Any ideas on whether this could be related to n8n cloud’s network configuration or how to work around it? Would switching to a different DNS resolver or retry logic help?

Thanks in advance for any help!

Hello @fermaf welcome to :n8n: community!

Have you considered enabling the “Retry on fail” option?

chrome_ZDhZsIoMnS

When I do that, the failure rate increases. I have to wait a couple of minutes for the failure rate to return to 1 in 10

Hey @fermaf

Are you calling an official API or just crawling?

Sometimes you need to set headers like User-Agent, Origin, and Referer to make the request look more like it’s coming from a real user…

full header as a real user…
by the way, it does not metters, The request does not arrive destination, it’s a local problem.