Failed to connect to a MongoDB Atlas cluster

Today when i tryed to connect to my cluster by mongoshell, i received the error below:

connecting to: mongodb://,,
{“t”:{"$date":“2021-03-31T14:21:12.044Z”},“s”:“I”, “c”:“NETWORK”, “id”:4333208, “ctx”:“ReplicaSetMonitor-TaskExecutor”,“msg”:“RSM host selection timeout”,“attr”:{“replicaSet”:“Cluster0-shard-0”,“error”:“FailedToSatisfyReadPreference: Could not find host matching read preference { mode: “nearest” } for set Cluster0-shard-0”}}

*** You have failed to connect to a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.

Error: connect failed to replica set Cluster0-shard-0/,, :
exception: connect failed
exiting with code 1

I’ve unninstall and reinstall, but without success.
The error persists…could you help me


Welcome to the Community!

What is the status of your cluster
Are all nodes up and running
What type of connect string are you using?SRV or a different
Have you whitelisted your IP

1 Like

Hi Ramachandra_Tummala
Thanks for answer, i’ve found the problem…it was my ISP that was blocking the port 27017, today is working fine.

The issue is solved :slight_smile:

Thanks a lot!

1 Like