HTTP Node throws getaddrinfo ENOTFOUND

Describe the issue/error/question

Good Evening,

we have an issue with our N8N which is kind of annoying as it does appear and vanish for no understandable reason.

What we are doing is simply read a CSV and send the content to an API line by line. I already tried batching, timeouts, retries, ignoring response codes but nothing keeps the problem away. It maybe is gone for some tests but it always gets back, we restart the flow maybe two or three times and wait for it to appear again.

The problem is also not appearing every time so I’m under the impression that something should be wrong on our end. Do you have a suggestion that I could lookup?

I would really appreciate some hints and thank you very much for your time.


What is the error message (if any)?

2022-03-17T15:18:13.509226054Z (node:7) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 64977)
2022-03-17T15:21:51.539268446Z (node:7) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 65057)

Share the output returned by the last node

{"status":"rejected","reason":{"message":"getaddrinfo ENOTFOUND","name":"Error","stack":"Error: getaddrinfo ENOTFOUND\n    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)","code":"ENOTFOUND"}}
NodeApiError: UNKNOWN ERROR - check the detailed error for more information
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest/HttpRequest.node.js:888:27)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:451:47

Information on your n8n setup

  • 0.165.1
  • Postgre
  • Running n8n via Docker

Hey @Benjamin_Exner,

Normally that error would suggest a network problem possibly DNS related. When you see the error in the UI / console does it actually have the \n at the end of the URL? It could be that if the host is set through an expression and there is a dodgy character at the end that you won’t see in the interface.

Hi @jon ,

do you mean that area (see picture)? If yes, no there is no \n.


The network problem should then be with our Server/Machine reaching the API right? This means I could check that by doing a curl from the machine itself :thinking:

Hey @Benjamin_Exner,

The problem with a \n character is you may not see it in that view, Are you dynamically setting the URL or is it static? If you were say reading that value from a CSV file that contained a \n character it would possibly break everything but only if a bad record comes in which would explain why it is intermittent.

If it is the network then in theory something like curl would help or even a nslookup / telnet just to make sure things exist and are open.

Hi @jon ,

the URL is static. I will try doing curls in that case and maybe I can spot something.

Thank you!

Hey @Benjamin_Exner,

I would be tempted to remove the expression just to be safe, it looks like the field has a slight tint to the background colour.

Hi @jon ,

ah, I see what you are talking about. The slight highlighting was due to me making the screenshot from the active node which was showing the error :-).

In its inactive state, the field looks the following way

I already started testing with dnslookup :crossed_fingers: and thank you!

1 Like