我创建了一个Atlas帐户,添加了用户名和密码,添加了白名单以从任何地方访问的IP,它为我提供了连接该字符串的连接方式,我还向该命令附加了测试密码,但是我无法连接到它? 这是我的连接字符串
mongo“ mongodb + srv://cluster0-oylgv.mongodb.net/test”-用户名ASiDesigner-密码Test1234
通过这个错误给我
Blockquote
mongo "mongodb+srv://cluster0-oylgv.mongodb.net/test" --username ASiDesigner --password Test1234
MongoDB shell version v4.0.5
connecting to: mongodb://cluster0-shard-00-00-oylgv.mongodb.net.:27017,cluster0-shard-00-01-oylgv.mongodb.net.:27017,cluster0-shard-00-02-oylgv.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=Cluster0-shard-0&ssl=true
2020-02-27T12:17:22.284+0330 I NETWORK [js] Starting new replica set monitor for Cluster0-shard-0/cluster0-shard-00-00-oylgv.mongodb.net.:27017,cluster0-shard-00-01-oylgv.mongodb.net.:27017,cluster0-shard-00-02-oylgv.mongodb.net.:27017
2020-02-27T12:17:32.798+0330 W NETWORK [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set Cluster0-shard-0
2020-02-27T12:17:32.798+0330 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-27T12:17:48.303+0330 W NETWORK [js] Unable to reach primary for set Cluster0-shard-0
2020-02-27T12:17:48.303+0330 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-27T12:17:48.303+0330 E QUERY [js] Error: connect failed to replica set Cluster0-shard-0/cluster0-shard-00-00-oylgv.mongodb.net.:27017,cluster0-shard-00-01-oylgv.mongodb.net.:27017,cluster0-shard-00-02-oylgv.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed