Linux Error Code ECONNREFUSED (111)
The remote host actively refused the connection.
The remote host actively refused the connection.
| Code | ECONNREFUSED (111) |
| Product | Linux |
| Company / origin | Linux community · International open source |
| Category | Operating Systems |
| Platform / versions | Linux kernel 4.x and later · Architecture-dependent errno numbering |
| Severity | error |
| Official source | Linux man-pages: errno(3) ↗ |
| Last verified | 2026-11-08 |
What does Linux error ECONNREFUSED (111) mean?
ECONNREFUSED (errno 111) means the TCP connection reached the host but no process was listening on the port, or a firewall rejected it. It is different from a timeout, where no response arrives at all.
Common causes
- The service is not running or is listening on a different port.
- A firewall or security group is rejecting the connection.
- The client is connecting to the wrong host or interface.
How to fix it
- Step 1
Check that the service is running and listening on the expected address.
- Step 2
Test the port locally with ss and remotely with nc or curl.
- Step 3
Review firewall rules and security groups for the source and destination.
When to escalate
Related codes
| Code | Name | What it means |
|---|---|---|
EADDRINUSE (98) | Address Already in Use | The network address or port is already bound. |
EACCES (13) | Permission Denied | The process does not have permission to access the file or directory. |
EBUSY (16) | Device or Resource Busy | The resource is busy and cannot be used or released. |
EEXIST (17) | File Exists | The file or directory already exists. |
EINVAL (22) | Invalid Argument | A system call or library function received an invalid argument. |
Source & verification
This page was checked against Linux man-pages: errno(3) on 2026-11-08. The code, product, and platform fields are kept separate from the explanation so corrections can be made without changing the URL.
Open Error Codes is independent and not affiliated with Linux community. Always confirm destructive or security-sensitive steps with the official documentation.