ETIMEDOUT, ECONNREFUSED, EHOSTUNREACH: Three Diagnoses
Three socket errors that read as 'the network is broken' are in fact three different answers to three different questions.
| Error | Packet reached peer? | Something answered? | Where to look |
|---|---|---|---|
| ECONNREFUSED | Yes | Yes, with RST | Listener, port, service down |
| ETIMEDOUT | Maybe | No | Firewall drop, host down, path |
| EHOSTUNREACH | No | ICMP no route | Routing, wrong address, VPC peering |
Published on debugly.dev by Rohit Bhadani | Founder of Krova Cloud