← Verse · A-to-Mind · Fix an automation

n8n "ECONNREFUSED" on an HTTP Request node: why the connection is refused and how to fix it

You see: ECONNREFUSED ยท The service refused the connection - perhaps it is offline

What it means

n8n tried to open a connection to an address and nothing was listening there. The most common reason is that n8n runs in Docker and the URL says localhost: inside the container, localhost is the container itself, not your computer or the other service.

How to fix it

  1. Look at the URL the node calls. If it says localhost or 127.0.0.1 and n8n runs in Docker, replace it: use the other container's service name (for example http://my-api:3000) when both are in the same Docker network, or host.docker.internal for something on your own machine.
  2. Check the port. The service has to be running and listening on the port in the URL; open the same URL from a terminal in the same place n8n runs to see if it answers.
  3. If the target is a cloud service, check it is up and that a firewall or IP allow list is not refusing n8n's address.
  4. Execute the node again once the URL answers.

If it keeps coming back

If it only fails now and then, the target is restarting or overloaded: turn on Retry On Fail in the node's settings and add a short wait between tries.

Still stuck? Ask Verse, free

Paste the error and what the automation does. Verse names the likely cause and the fix, in seconds, no account.

Ask Verse about this error

Or have it fixed: $25

One broken automation, diagnosed and repaired, with proof it runs again. Reply to the receipt with what stopped.

Get the One-Time Fix

The One-Time Fix covers one workflow. What you send and what you get back.

Sources