无法再连接到mongoDB Atlas

问题描述 投票:0回答:1

我在Mongo Atlas中有一个免费的数据库。它曾经可以工作,但是我不知道我做了什么更改,它不再起作用了。我确定我已经输入了写密码:

Ties-MacBook-Pro:devconnector chengtie$ mongo "mongodb+srv://cluster0-jnhgq.azure.mongodb.net/test"  --username cheng123
MongoDB shell version v4.0.6
Enter password: 
connecting to: mongodb://cluster0-shard-00-01-jnhgq.azure.mongodb.net.:27017,cluster0-shard-00-00-jnhgq.azure.mongodb.net.:27017,cluster0-shard-00-02-jnhgq.azure.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true
2020-02-11T14:38:51.292+0100 I NETWORK  [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-01-jnhgq.azure.mongodb.net.:27017,cluster0-shard-00-00-jnhgq.azure.mongodb.net.:27017,cluster0-shard-00-02-jnhgq.azure.mongodb.net.:27017
2020-02-11T14:39:01.342+0100 W NETWORK  [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set Cluster0-shard-0
2020-02-11T14:39:01.342+0100 I NETWORK  [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2020-02-11T14:39:16.861+0100 W NETWORK  [js] Unable to reach primary for set Cluster0-shard-0
2020-02-11T14:39:16.861+0100 I NETWORK  [js] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2020-02-11T14:39:16.861+0100 E QUERY    [js] Error: connect failed to replica set Cluster0-shard-0/cluster0-shard-00-01-jnhgq.azure.mongodb.net.:27017,cluster0-shard-00-00-jnhgq.azure.mongodb.net.:27017,cluster0-shard-00-02-jnhgq.azure.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:343:13
@(connect):1:6
exception: connect failed

我试图将我的IP列入白名单,但仍然无法正常工作:

enter image description here

有人可以帮忙吗?

mongodb mongodb-atlas
1个回答
0
投票

我想出了原因:那是因为我使用了禁止连接的无线“ eduroam” ...如果我改用4G手机的wifi,就可以使用...

© www.soinside.com 2019 - 2024. All rights reserved.