【发布时间】:2019-07-09 11:08:38
【问题描述】:
我正在尝试从 windows 终端中的 mongoshell 连接到我的 atlas 集群。连接字符串正确写入,我确保集群版本 (4.0.10) 和 shell 版本 (4.0.10) 相同。我还确保我的 IP 地址被列入白名单,并且出于测试目的,我还添加了“0.0.0.0/0”。仍然无法连接。
我尝试过创建新数据库、更改用户、创建新用户、更改用户权限、更改 ip 白名单、使用不同的连接字符串、关闭 windows 防火墙,但仍然存在相同的错误。
MongoDB shell version v4.0.10
Enter password:
connecting to: mongodb://charmsdb-shard-00-02-5s81x.mongodb.net.:27017,charmsdb-shard-00-01-5s81x.mongodb.net.:27017,charmsdb-shard-00-00-5s81x.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=CharmsDB-shard-0&ssl=true
2019-07-09T12:42:04.136+0200 I NETWORK [js] Starting new replica set monitor for CharmsDB-shard-0/charmsdb-shard-00-02-5s81x.mongodb.net.:27017,charmsdb-shard-00-01-5s81x.mongodb.net.:27017,charmsdb-shard-00-00-5s81x.mongodb.net.:27017
2019-07-09T12:42:04.256+0200 W NETWORK [js] Unable to reach primary for set CharmsDB-shard-0
2019-07-09T12:42:04.256+0200 I NETWORK [js] Cannot reach any nodes for set CharmsDB-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
我希望建立一个网络连接,但它不允许我连接到任何网络。
【问题讨论】:
-
这是一个 M0 集群吗?你还有这个问题吗?在 M0 中,有时会出现一些人在serverfault.com/questions/955555/… 中报告的连接问题
标签: mongodb mongo-shell mongodb-atlas