Skip to content
ohsudo, Home

Tags

#networking

No route to host
Networking

"No route to host": usually a firewall saying no, sometimes a machine that isn't there

Fix "No route to host" from ssh, curl or nc: check the firewall on the other machine (firewalld rejects by default), then whether the host is up.

Beginner · 4 min read

Connection timed out
Networking

"Connection timed out" vs "Connection refused": what each one tells you, and how to fix it

Timed out means a firewall dropped the packets; refused means nothing listens there. Tell them apart with nc and curl, then fix ufw, firewalld or the bind address.

Beginner · 5 min read

connect ECONNREFUSED 127.0.0.1
Docker & Containers

Docker: "connection refused" to localhost from a container — how to reach the host

Fix "connection refused" when a container connects to localhost: use host.docker.internal or a Compose service name, make the host service listen, and check the firewall.

Beginner · 4 min read

Is the server running on that host and accepting TCP/IP connections?
Databases

PostgreSQL "Connection refused … Is the server running?": find out why nothing answers on 5432

Fix PostgreSQL "connection refused": check that it runs, read why it did not start, then fix listen_addresses, the port, the firewall or Docker.

Beginner · 3 min read