| Previous | Next |
| ETIMEDOUT | EHOSTDOWN |
ECONNREFUSED
An active refusal is different from a timeout
ECONNREFUSED indicates that connection establishment reached a point where the target machine refused the request. Solaris notes the common case of connecting to an inactive service. POSIX connect() likewise describes a target address that is not listening or refuses the request.
This differs from ETIMEDOUT, where a response is not received within the required period, and from ENETUNREACH, where the destination network cannot be reached. The speed and origin of the failure are useful clues, but the exact errno is the primary distinction.
Endpoint checks for a refusal
- Verify the destination address, port, and protocol after name resolution and service discovery.
- Confirm the server is listening on the expected local address and address family, not only on loopback or another interface.
- Inspect firewall or policy components capable of actively rejecting traffic, while keeping refusal separate from silent packet loss.
References
- Oracle Solaris intro(2) errno catalog
- POSIX connect() error conditions
- RFC 9293 TCP connection state and reset semantics
Looking for a different code? Search another status or error code.
