无法从两个不同的网络连接到MongoDB Atlas

时间:2020-04-09 17:52:56

标签: mongodb-atlas mongo-shell mongodb-compass

它成功连接到我家的网络,但是一旦我去父亲的办公室,就会出现以下错误。

白名单条目:0.0.0.0/0

尝试使用MongoDB Compass进行连接时出现此错误。

connecting to: mongodb://sandbox-shard-00-00-iojwf.mongodb.net:27017,sandbox-shard-00-01-iojwf.mongodb.net:27017,sandbox-shard-00-02-iojwf.mongodb.net:27017/test?authSource=admin&compressors=disabled&gssapiServiceName=mongodb&replicaSet=Sandbox-shard-0&ssl=true
2020-04-09T11:58:24.423-0500 I  NETWORK  [js] Starting new replica set monitor for Sandbox-shard-0/sandbox-shard-00-00-iojwf.mongodb.net:27017,sandbox-shard-00-01-iojwf.mongodb.net:27017,sandbox-shard-00-02-iojwf.mongodb.net:27017
2020-04-09T11:58:40.425-0500 W  NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set Sandbox-shard-0
2020-04-09T11:58:40.425-0500 I  NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set Sandbox-shard-0. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.

*** It looks like this is a MongoDB Atlas cluster. Please ensure that your IP whitelist allows connections from your network.

2020-04-09T11:58:40.429-0500 E  QUERY    [js] Error: connect failed to replica set Sandbox-shard-0/sandbox-shard-00-00-iojwf.mongodb.net:27017,sandbox-shard-00-01-iojwf.mongodb.net:27017,sandbox-shard-00-02-iojwf.mongodb.net:27017 :
connect@src/mongo/shell/mongo.js:341:17
@(connect):2:6
2020-04-09T11:58:40.435-0500 F  -        [main] exception: connect failed
020-04-09T11:58:40.437-0500 E  -        [main] exiting with code 1

0 个答案:

没有答案