Connection Issue in MongoDB Compass and Inactive IP in MongoDB Atlas from Ubuntu 22

Hello,

I’m currently encountering a connectivity problem while trying to connect to my MongoDB Atlas cluster from my Ubuntu 22 machine. This issue has arisen after not accessing my projects for a few months. I’ve been consistently receiving the following error message:

“querySrv ENOTFOUND _mongodb._tcp.cluster0.vdlcqjo.mongodb.net.”

To troubleshoot and resolve this issue, I’ve taken the following steps:

1. Confirmed that my Internet connection is functional.
2. Validated the accuracy of my connection details.
3. Attempted to add my current IP address to the "Network Access" section of MongoDB Atlas, aiming to fix the issue.
4. Ensured that my current IP address is included in the MongoDB Atlas IP whitelist.
5. Confirmed that my firewall (ufw) is inactive.
6. Tried connecting from a different network, yielding no success.

However, despite my efforts, the error persists, impeding my connection to the MongoDB Atlas cluster. Furthermore, after entering my IP address into the “Network Access” section of MongoDB Atlas, I noticed that it was labeled as “inactive.” Unfortunately, I couldn’t find any buttons or switches to activate it.

I kindly request assistance in resolving this situation. I would greatly appreciate guidance on troubleshooting this connectivity problem within the context of Ubuntu 22. Specifically, I’m seeking advice on how to activate my IP address in the “Network Access” section since I couldn’t locate any buttons or switches for activation.

Thank you for your prompt attention and support.

Best regards,
Invectiv System

Hi @Invectiv_system,

Please see the details on my post Can't connect to MongoDB Atlas - querySrv ENOTFOUND - #20 by Jason_Tran regarding details of the querySrv error.

Using the same srv record you posted, the DNS associated with my machine was able to resolve the hostnames:

nslookup -type=srv _mongodb._tcp.cluster0.vdlcqjo.mongodb.net
Server:		127.0.0.1
Address:	127.0.0.1#53

Non-authoritative answer:
_mongodb._tcp.cluster0.vdlcqjo.mongodb.net	service = 0 0 27017 ac-x2leqim-shard-00-00.vdlcqjo.mongodb.net.
_mongodb._tcp.cluster0.vdlcqjo.mongodb.net	service = 0 0 27017 ac-x2leqim-shard-00-01.vdlcqjo.mongodb.net.
_mongodb._tcp.cluster0.vdlcqjo.mongodb.net	service = 0 0 27017 ac-x2leqim-shard-00-02.vdlcqjo.mongodb.net.

From the machine attempting to connect, you can try the same thing to see what result you get.

If there is nothing returned from the request, you can try a different DNS like Google’s DNS for troubleshooting purposes.

Hope this helps.

Regards,
Jason