Error while connecting MongoDB ATLAS TO MONGODB COMPASS

I am a beginer in mongoDB and learning Mongodb atlas.

  • In MongoDB Atlas, Under database access created username and password ( password is system generated and has no special character)
  • Under Network access added a public ip address (allow access from anywhere)
  • Under database deployment loaded sample database.
  • Now I wanted to see my cluster data, so wanted to connect it to vs code or MongoDB Compass. I clicked connect , selected connect using mongo db compass, copied the string.
  • now i opened Mongodb compass, and under New connection i.e connect to a MongoDB deployment , i entered my URLmongodb+srv://gourav_singh:7gamf8UkL8B6MET@cluster0.9dmds.mongodb.net/test
  • clicked Connect But i got error as : Unable to connect: connect ECONNREFUSED 3.6.85.199:27017

How I can fix it, Looking for kind help. Thanks in advance

This is not a valid cluster.

Ensure that you whitelist your ip address under Network Access → Add IP address

Simple reason is MongoDB atlass only allow connections from trusted IP addresses

This is a system generated, how can I fix it.

I tried adding my current ip address under network access, but still facing the same issues. And another way to whitelist ip address is to do it under security tab but security tab is not available for free community version. Looking for kind help.

You must have a typo in the name.

There is no DNS entry for the name cluster0.9dmds.mongodb.net.

Thank you sir but sir i generated another url mongodb+srv://gouravsingh:gouravsingh@cluster0.3iv7ree.mongodb.net/test
but still facing the same issues.

This one is correct:

id 36076
opcode QUERY
rcode NOERROR
flags QR RD RA
;QUESTION
cluster0.3iv7ree.mongodb.net. IN ANY
;ANSWER
cluster0.3iv7ree.mongodb.net. 60 IN TXT "authSource=admin&replicaSet=atlas-122qwu-shard-0"
cluster0.3iv7ree.mongodb.net. 60 IN SRV 0 0 27017 ac-noap5ca-shard-00-00.3iv7ree.mongodb.net.
cluster0.3iv7ree.mongodb.net. 60 IN SRV 0 0 27017 ac-noap5ca-shard-00-01.3iv7ree.mongodb.net.
cluster0.3iv7ree.mongodb.net. 60 IN SRV 0 0 27017 ac-noap5ca-shard-00-02.3iv7ree.mongodb.net.
;AUTHORITY
;ADDITIONAL

Now allow network access from everywhere.

yes sir i allowed access from anywhere

may you please check whether this works for you, it is still not working for me, i can connect to local server which works well but cloud isn’t working

I works fine now.

May be your VPN, ISP stops you from going. What do you get when you try
http://portquiz.net:27017/.

this is the error i am consistently getting sir

ISP, VPN or firewall is blocking you.

yes sir may be, when i clicked your link, it says site is not reachable.

Thank you so much sir for kind help, i will try to fix ISP, VPN or firewall, though not sure how to do it. thanks a lot.

1 Like

For now, change the password you shared.

sure sir, i’ will change it.