Error querySrv ENOTFOUND

When trying to connect I receive this error Error querySrv ENOTFOUND I’m not sure of the issue I’ve searched and searched. The frustrating this is my app worked; however I’m unsure of when it stopped working. If anyone could be of assistance that would be great!!

Hi @Tamara_Wilburn - Welcome to the community :wave:

I would read over a similar post : Can't connect to MongoDB Atlas - querySrv ENOTFOUND

You can try with a different DNS (like for troubleshooting purposes but the error you’ve provided indicates a DNS resolution failure for the SRV record associated with the connection string used. Do you know if any network settings would have changed recently since you have advised it worked prior?


I know according to others, that Heroku did some sort of update; I’m assuming that’s when the issues occurred, I literally finished the projects, deployed them and never touched them again out of fear I would break them lol.

1 Like

Interesting - Might be worth contacting them also regarding the sudden DNS error.

In terms of the cluster itself, can you check the connection string matches or if the cluster is active? I was unable to resolve the one you provided although I can understand if this is because you changed it for security concerns:

** server can't find NXDOMAIN

For reference just to compare, I performed a nslookup on my own test cluster where 3 hostnames were able to be resolved:

nslookup -type=srv _mongodb._tcp.cluster0.<REDACTED>

Non-authoritative answer:	service = 0 0 27017 ac-iceu1mh-shard-00-00.<REDACTED>	service = 0 0 27017 ac-iceu1mh-shard-00-01.<REDACTED>	service = 0 0 27017 ac-iceu1mh-shard-00-02.<REDACTED>

I’m not sure how to do that

1 Like

This is the error message you provided at the start :arrow_double_up:

The screenshot you provided has a different unique identifer as far as I can see. rx6v7 in the original error vs ztqwf in the screenshot.

It does look like the screenshot’s SRV record resolves to the hostnames from my system (where as the original error srv record didn’t):

nslookup -type=srv

Non-authoritative answer:	service = 0 0 27017	service = 0 0 27017	service = 0 0 27017

Can you try check your connection string in Heroku and make sure it matches this cluster (that you’ve attached in the screenshot)? You can get the connection string in Atlas from the connect button of the cluster.

1 Like

I fixed it. :flushed: for some strange reason the backend of the project wasn’t showing up in MongoDB Atlas, all of a sudden it loaded, and the cluster0 was paused…, and that was the fix. OMG LOL. thx for your help!!

1 Like

Thanks for confirming :slight_smile: FWIW from the Pause, Resume or Terminate a Cluster documentation:

Atlas automatically pauses all inactive M0 , M2 , and M5 clusters after 60 days.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.