Mongo shell connection error to Atlas cluster

I created a new MongoDB user, and allowed connections from anywhere in the IP Whitelist section.
I tried to connect using the CLI from windows 10, but I got a connection error.

This is the command:
mongo “mongodb+srv://” --username m001-student

the cluster name is Cluster0 and the user I have created has the following credentials: username:m001-student

after entering the password I got this error:

socket exception [CONNECT_ERROR] server [] connection pool error: network error while attempting to run command ‘isMaster’ on host ‘

The mongoDB shell version is 4.0.6

any help is appreciated
Thank you!

I think in your CLI you forgot to type the password in the command.

instead of:
mongo “mongodb+srv://” --username m001-student

mongo “mongodb+srv://” --username m001-student --password m001-mongodb-basics

1 Like

Hi Abdul, thanks for the reply.
I forgot to mention that, after launching that command, the CLI requests the password. After entering it, I got the error

switching to another network solved the problem. Thanks a lot

I have a similar issue. I tried mongo “mongodb+srv://” --username m001-student --password m001-mongodb-basics.

But I get this result instead. How do I correct it?

The full view is image

Already responded in other thread
Ignore those warning messages
You are already at mongo prompt which means successfully connected to mongodb