I have been able to connect to my MongoDB database until today, when I am suddenly unable to. Instead, the connection attempt times out after 10 seconds and I get the error queryTxt ETIMEOUT jblakdcluster.fti4a.mongodb.net
In order to isolate the bug, I have tried the following (but to no avail):
Connecting after disabling my firewall completely
Connecting from another network (using my phone’s wifi hotspot instead of my home wifi)
Connecting from mongosh
Connecting from MongoDB Compass
Connecting from mongosh using another computer
Terminating my existing cluster and creating a brand new one, and then connecting to the new one
Quadruple-checking my database user credentials and access rights
Quadruple-checking that network access is configured to 0.0.0.0/0 (theoretically able to connect from any IP address)
I believe I have taken a reasonable amount steps to try to solve the problem, and now I must ask for help. Please try connecting to my database using mongosh with the following information (the database is for my own educational purposes only and doesn’t have any sensitive information): mongosh "mongodb+srv://jblakdcluster.fti4a.mongodb.net/myFirstDatabase" --username rwuser
password: rwuserpw
If the wider community is getting the same error that I am having, then I can be pretty sure that either there is something wrong on MongoDB’s end, or there’s something I’ve missed from my (fairly exhaustive) troubleshooting process.
It is indeed a DNS issue on my end. I asked my friend to run the nslookup commands and they got the same result as you.
I am getting:
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 8.8.8.8
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
I started off with my default IPv4 DNS, but since then I have tried using the Google DNS and OpenDNS, to no avail. All three DNS servers that I’ve tried works normally for other URLs, just not the MongoDB one.
Either your home network or your isp is blocking other dns services. Wherever they end up is not proxying the request(s) properly (at least for the TXT record).
You can get the connection string (non-srv version) from the connect button on you database in Atlas. Using an old version of shell. There are too may caveats to make that useful instruction so as we have all the pieces here we can build it.
I was able to connect via mongosh by using the command mongosh "mongodb://jblakdcluster-shard-00-00.fti4a.mongodb.net:27017,jblakdcluster-shard-00-02.fti4a.mongodb.net:27017,jblakdcluster-shard-00-01.fti4a.mongodb.net:27017/myFirstDatabse?authSource=admin&replicaSet=atlas-dtrnwi-shard-0&tls=true" --username <username>
I had to add quotation marks to enclose the connection string so that Windows cmd wouldn’t misinterpret ampersands as additional commands.