ERR_CONNECTION_REFUSED -102

Net error -102

BROWSER

The site can't be reached — connection refused.

Also searched as: net::ERR_CONNECTION_REFUSED, localhost refused to connect, site refused to connect, error -102

Browser error page with a network error code and a checklist of likely causes
Browser network errors: rule out your connection first, then the site.

What it means

Chrome reports that the site 'refused to connect'. The server's machine was reached, but nothing accepted connections on the requested port, so the operating system answered with a reset. It is very common when developing locally (localhost:3000, :8080) and when a web server process has crashed.

Applies to: Chrome, Edge, Brave, Opera, Vivaldi

How to fix ERR_CONNECTION_REFUSED

  1. Double-check the address and port: 'http://' vs 'https://' and ':3000' vs ':8080' are different services
  2. Reload in a private window and from another device to see whether the refusal is specific to your machine
  3. Turn off VPN, proxy and antivirus web filtering, then retry; some filters reject connections locally
  4. Clear Chrome's internal state via 'chrome://net-internals/#sockets' (Flush socket pools) and run 'ipconfig /flushdns'
  5. Local development: confirm your dev server is actually running and listening on that port ('lsof -i :3000' on macOS/Linux, 'netstat -ano | findstr :3000' on Windows)
  6. Local development: if the server binds only to 127.0.0.1 or only to IPv6 '::1', 'localhost' may resolve to the other family; try 'http://127.0.0.1:PORT' or bind to 0.0.0.0
  7. If you own the site: check that nginx/Apache is running ('systemctl status nginx'), listening on 80/443 ('ss -tlnp'), and that no firewall rule REJECTs those ports

Why it happens

The target host replied to the TCP SYN with an RST, which happens when no process is listening on that port, the web server crashed or is restarting, a firewall is set to reject instead of drop, or the request goes to the wrong host because of a stale DNS or hosts entry.

FAQ

Why does localhost refuse to connect?

Your local server is not running, crashed on startup, or listens on a different port or address family. Check the terminal where you started it and confirm the port with 'lsof -i' or 'netstat'.

Can a firewall cause ERR_CONNECTION_REFUSED?

Yes, when the firewall rule is set to reject. Firewalls that silently drop traffic produce ERR_CONNECTION_TIMED_OUT instead.

Related errors

Source: Chromium net_error_list.h · fixes written and reviewed by the editors (see our editorial policy)

Last updated: