How do I fix the "DNSHostNotFound Failed to look up service" error?

Validated on 20 Nov 2024 • Last edited on 18 Mar 2026

When connecting to a MongoDB managed database from your local machine, you may get the following error:

DNSHostNotFound: Failed to look up service “_mongodb._tcp.<MongoDB hostname>”

This error can occur when you use your internet service provider’s default DNS server, which might not support the SRV lookups used by the DNS seed list connection string format.

To fix this error, you can try using a public DNS server, such as Google’s 8.8.8.8, instead.

How do I fix the "Cannot create property _id on string" type error?

Remove the _id field from your JSON data so MongoDB can automatically generate unique _id values for each document during import.

How do I unblock my MongoDB database?

Increase your cluster’s disk space or delete data to unblock your MongoDB database.

How do I fix the "Connection Refused" error when connecting to my database?

Verify the connection string, ensure correct port usage, and add your local machine to the database cluster’s trusted sources.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.