-
Type: Investigation
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.28.1
-
Component/s: None
-
Labels:None
Problem Statement/Rationale
What is going wrong?
Error displayed to user when IP not in IP access list is not descriptive enough nor does it match mongo shell connection error message. It would be helpful to have consistent messaging when the connection problem is the same.
Steps to Reproduce
How could an engineer replicate the issue you’re reporting?
Create Atlas cluster M0 and add username/password.
Don't add computer IP to IP Access List and attempt to connect with correct username/pwd using connection string method.
Expected Results
What do you expect to happen?
Error messages to be similar
Actual Results
What do you observe is happening?
From mongo shell:
mongo "mongodb+srv://feliciacompasstest.2plu9.mongodb.net/myFirstDatabase" --username felicia
MongoDB shell version v4.4.4
Enter password:
connecting to: mongodb://feliciacompasstest-shard-00-00.2plu9.mongodb.net:27017,feliciacompasstest-shard-00-01.2plu9.mongodb.net:27017,feliciacompasstest-shard-00-02.2plu9.mongodb.net:27017/myFirstDatabase?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=atlas-nar6r5-shard-0&ssl=true
{"t":
,"s":"I", "c":"NETWORK", "id":4333208, "ctx":"ReplicaSetMonitor-TaskExecutor","msg":"RSM host selection timeout","attr":{"replicaSet":"atlas-nar6r5-shard-0","error":"FailedToSatisfyReadPreference: Could not find host matching read preference
{ mode: \"nearest\" }for set atlas-nar6r5-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 atlas-nar6r5-shard-0/feliciacompasstest-shard-00-00.2plu9.mongodb.net:27017,feliciacompasstest-shard-00-01.2plu9.mongodb.net:27017,feliciacompasstest-shard-00-02.2plu9.mongodb.net:27017 :
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1
From Compass:
"connection <monitor> to 34.238.182.221:27017 closed"
Additional Notes
Any additional information that may be useful to include.
This useful message from mongo shell is, "You have failed to connect to a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network"