DBAtlas · Database operations atlas

6: HostUnreachable (error code 6)

MongoDB

What does it mean?

The driver/client could not reach the target MongoDB server (host). No connection could be established at the network level.

Why does it happen?

The server is down, wrong host/port, firewall blocking, a DNS resolution problem, a network outage, or a bindIp configuration that excludes the client.

How to fix it

Check that the hostname and port are correct (default 27017). Verify that the mongod service is running. Test the firewall and network access (ping/telnet). Make sure the bindIp setting in mongod.conf allows client access. Verify DNS/SRV records (for mongodb+srv connections).

Open in DBAtlas →

More from this engine