ECONNREFUSED
Connection refused
Seen in Node.js, Python (ConnectionRefusedError), Java (Connection refused)
The host answered, but nothing is listening on that port, or a firewall actively rejected the connection.
Common causes
- The service is stopped or crashed.
- The service listens on a different port, or only on 127.0.0.1.
- A firewall sends a reject (RST) for the port.
How to fix it
- Start the service and check it binds to 0.0.0.0 or the right interface.
- Confirm the port number in config and client.
- Allow the port in the firewall or security group.
Got a different message? Paste it into the error explainer.
Related errors
- ETIMEDOUT · Connection timed out
- WSAETIMEDOUT (10060) · Windows connection attempt timed out
- WSAECONNREFUSED (10061) · Windows connection refused
- Destination port unreachable. · The target rejected the packet with port unreachable
- ECONNRESET · Connection reset by peer
- EHOSTUNREACH · No route to host
- getaddrinfo ENOTFOUND · The hostname doesn't exist in DNS
- getaddrinfo EAI_AGAIN · Temporary DNS failure
- ENETUNREACH · Network is unreachable
- Broken pipe · Wrote to a connection or pipe that was already closed
- Software caused connection abort · Your own system aborted the connection
- Request timed out. · Ping got no reply