Authentication failed when connecting atlas from mongo shell

I followed every step exactly in https://university.mongodb.com/mercury/M001/2019_November_5/chapter/Chapter_2_The_MongoDB_Query_Language_Atlas/lesson/5ccc5805fcdfc9cfbb5065c5/problem.
Here’s what I got:
image

I used the username m001-student and enter the password m001-mongodb-basics after being prompted(I used the same credentials shown in lab 2.0 when creating the cluster). Why did it keep showing the error of “Authentication failed”.
image

I have also added 0.0.0.0/0 in IP whitelist.
image

So what went wrong? Thanks for the help.

Forgot to say I ran the mongo shell on ubuntu 18.04. mongodb was installed followed the steps in https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/.

Hi @Songfang_60099,

I’m able to connect to your cluster.

It might be possible that the password that you entered was incorrect. Can you please try to connect using this connections string ?

mongo "mongodb+srv://sandbox-feuej.mongodb.net/test" -u m001-student -p m001-mongodb-basics

If the issue still persists then please feel free to get back to us.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Thanks for the quick response. Yes, the issue persists.

Hi @Songfang_60099,

Are you able to ping the cluster ?

ping sandbox-shard-00-00-feuej.mongodb.net

Can you please make sure you are not connected to any VPN network and the firewall/anti-virus is not blocking connection request to/from your local network ?

If that is the case then please try to connect from some other location such as your home network.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hi Shubham,

You were right. It was caused by my broadband ISP. They must have setup some kind firewall. After I changed to use my cellphone hotspot, I could connect to my cluster. Thanks for the help!

Songfang

Hi @Songfang_60099,

I’m glad your issue got resolved. If you have any other query then please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer