Mongodb Can';t使用DNS种子列表连接格式连接,但使用标准连接字符串可以正常工作
我试图连接到我的atlas群集,但它给了我超时错误。我尝试连接到本地mongodb,它可以工作,并且使用同一集群的标准连接字符串:Mongodb Can';t使用DNS种子列表连接格式连接,但使用标准连接字符串可以正常工作,mongodb,mongodb-compass,Mongodb,Mongodb Compass,我试图连接到我的atlas群集,但它给了我超时错误。我尝试连接到本地mongodb,它可以工作,并且使用同一集群的标准连接字符串: (mongo "mongodb://cluster0-shard-00-00-n1kmr.mongodb.net:27017,cluster0-shard-00-01-n1kmr.mongodb.net:27017,cluster0-shard-00-02-n1kmr.mongodb.net:27017/test?replicaSet=Cluster0-shard-
(mongo "mongodb://cluster0-shard-00-00-n1kmr.mongodb.net:27017,cluster0-shard-00-01-n1kmr.mongodb.net:27017,cluster0-shard-00-02-n1kmr.mongodb.net:27017/test?replicaSet=Cluster0-shard-0" --ssl --authenticationDatabase admin --username <username> --password <password>)
和db版本v4.2.6
>>mongo --version
MongoDB shell version v4.2.6
git version: 20364840b8f1af16917e4c23c1b5f5efd8b352f8
allocator: tcmalloc
modules: none
build environment:
distmod: 2012plus
distarch: x86_64
target_arch: x86_64
>> mongod --version
db version v4.2.6
git version: 20364840b8f1af16917e4c23c1b5f5efd8b352f8
allocator: tcmalloc
modules: none
build environment:
distmod: 2012plus
distarch: x86_64
target_arch: x86_64
你解决了吗?没有。我只是用了标准连接字符串。
>> mongod --version
db version v4.2.6
git version: 20364840b8f1af16917e4c23c1b5f5efd8b352f8
allocator: tcmalloc
modules: none
build environment:
distmod: 2012plus
distarch: x86_64
target_arch: x86_64