Error fix

How to fix “ERR_CONNECTION_REFUSED

Nothing accepted the TCP connection on that host:port—service down, wrong port, or firewall.

Updated Apr 20, 2026

Tools that help with this

Fastest fix

Start here first. Step 1 fixes most cases—then work down the list.

  1. Verify process is running and listening (ss -lntp / netstat).
  2. Open firewall rules for the intended port and interface.
  3. Confirm you target the correct hostname (localhost vs LAN IP vs public DNS).

Why this works

These steps work because it rules out local security software dropping the connection.

What this means

The OS actively refused the connect()—different from timeout (no SYN) or reset mid-flight.

Common causes

  • Service not listening

    App crashed, wrong bind address (127.0.0.1 vs 0.0.0.0), or wrong port.

  • Firewall

    Security group, ufw, or corporate filter blocks the port.

Step-by-step fix

  1. Reach the listener

    1. Verify process is running and listening (ss -lntp / netstat).
    2. Open firewall rules for the intended port and interface.
    3. Confirm you target the correct hostname (localhost vs LAN IP vs public DNS).

FAQ

Refused in Docker only?
Publish ports (-p) and ensure the service binds to 0.0.0.0 inside the container.
IPv6 vs IPv4?
Try [::1] vs 127.0.0.1 and ensure dual-stack listeners.
Works on Wi‑Fi not mobile?
Hairpin NAT or CGNAT can block self-connections to your public IP.

Still stuck? Try these related fixes next.

Edit your error

Tweak the message and run again—we'll match an existing fix or generate a new page.

Original error message
ERR_CONNECTION_REFUSED
Fix another errorHTTP status codesURL status checkerRedirect checkerAll tools