What does errno 61 (ECONNREFUSED) mean?

 
Could be also:
ConstantTypeOS
ERROR_PRINTQ_FULLWin32 errorWindows
ENODATAerrnoLinux
ENODATAerrnoSolaris
INTERRUPT_EXCEPTION_NOT_HANDLEDBugCheck CodeWindows
Previous Next
ETIMEDOUT ELOOP

ECONNREFUSED

An active negative result from the destination path

ECONNREFUSED differs from a timeout because the attempt received an active refusal. For TCP, a connection attempt to a closed port is commonly rejected with a reset according to the TCP state machine; other socket types can surface refusal through their own protocol error reporting.

The code is strong evidence that the request reached enough of the network path to be rejected, but it does not prove which process or policy produced the refusal. A host firewall, proxy, service manager, port mapping, or endpoint state can be involved.

Evidence that narrows the cause

  • Record the numeric remote address and port after name resolution, transport protocol, local source address, and whether the socket was newly created or reused.
  • Check listener and policy state at the destination or intermediary for the same timestamp; do not substitute a different port and call the original service healthy.
  • Distinguish a persistent refusal from a transient deployment race or port-forwarding change by correlating several attempts with endpoint logs.

Not a generic connectivity error

ENETUNREACH and EHOSTUNREACH describe absent routes or hosts. ETIMEDOUT describes no timely completion. ECONNREFUSED is the distinct case where connection establishment was actively rejected.

References


Looking for a different code? Search another status or error code.