[COMPASS-4984] Compass Error msg not instructional enough from mongo shell when IP not in IP Access List Created: 03/Aug/21  Updated: 03/Oct/23

Status: Open
Project: Compass
Component/s: None
Affects Version/s: 1.28.1
Fix Version/s: None

Type: Investigation Priority: Minor - P4
Reporter: Felicia Hsieh Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2021-08-03 at 2.20.37 PM.png    

 Description   

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":

{"$date":"2021-08-03T21:19:22.105Z"}

,"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"


Generated at Wed Feb 07 22:38:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.