Linux Connection Refused
Warningnetwork
Overview
Linux "Connection refused" means a TCP connection attempt was actively rejected because no service is listening on the target port.
Key Details
- errno 111 (ECONNREFUSED) — TCP RST received
- Target host is reachable but no service on that port
- Different from timeout (host unreachable) or no route
- Firewall may also send RST packets
Common Causes
- Service is not running on the target port
- Service is listening on a different port or interface
- Firewall rejecting (not dropping) the connection
- Service crashed and is not restarting
Steps
- 1Check if service is running: systemctl status servicename
- 2Check listening ports: ss -tlnp | grep port
- 3Check firewall: iptables -L or firewall-cmd --list-all
- 4Verify service binds to correct interface (0.0.0.0 vs 127.0.0.1)
Tags
linuxnetworkconnection refusedtroubleshootingfix
More in Network
windows-651-pppoe-connection-failedWindows Error 651 — PPPoE Connection Failed
Warningwindows-691-authentication-failedWindows Error 691 — Authentication Failed
Warningwindows-720-ppp-connection-failedWindows Error 720 — PPP Connection Failed
Errorwindows-800-vpn-tunnel-failedWindows Error 800 — VPN Tunnel Failed
Warningwindows-network-error-619Windows VPN Error 619 — Connection Could Not Be Established
Warningwindows-network-error-868Windows VPN Error 868 — Remote Server Not Resolved
WarningFrequently Asked Questions
The server is up (it sent a RST), but nothing is listening on that specific port.