WSAECONNREFUSED (10061)
Windows connection refused
Seen in Windows applications (Winsock), "Socket Error # 10061"
The target machine answered but actively refused the connection, which means nothing accepted it on that port.
Common causes
- The service is stopped or listens on a different port.
- The service only listens on 127.0.0.1 or one interface, and you connected to another address.
- A firewall rule rejects the connection instead of dropping it.
How to fix it
- Check the service is running and listening with `netstat -ano | findstr :PORT` on the server.
- Bind the service to the correct interface, or connect to the address it listens on.
- Confirm the port number in both client and server configuration.
Got a different message? Paste it into the error explainer.
Related errors
- ECONNREFUSED · Connection refused
- ETIMEDOUT · Connection timed out
- WSAETIMEDOUT (10060) · Windows connection attempt timed out
- 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