230 — DNSHostNotFound

networkingconnectivity

DNS resolution failed for the specified hostname

What is happening?

DNSHostNotFound is returned when a DNS lookup for a hostname in the connection string or SRV record fails. This is similar to HostNotFound (7) but specifically indicates a DNS-level failure rather than a TCP-level failure. It commonly occurs with mongodb+srv:// connection strings when the SRV or TXT records cannot be resolved.

Common causes

  1. SRV record lookup failing for mongodb+srv:// connection strings
  2. DNS server is unreachable from the application host
  3. Cluster hostname is incorrect or the cluster was terminated
  4. Private DNS zone not accessible from outside the VPC
  5. DNS TTL caching serving stale records after a cluster migration

Diagnostic Steps