【发布时间】:2017-10-20 15:14:44
【问题描述】:
我当前的 MongoDb 版本是 3.2.7 我正在尝试用这个连接到我的数据库
"mongo mongodb://meanbeta-shard-00-00-sshqm.mongodb.net:27017,meanbeta-shard-00-01-sshqm.mongodb.net:27017,meanbeta-shard-00-02-sshqm.mongodb.net:27017/test?replicaSet=MEANbeta-shard-0" --authenticationDatabase admin --ssl --username xxxx --password xxxxx
昨天我能够通过 mongo shell 连接,但今天它给了我错误,但我仍然能够使用 Compass 应用程序连接:
2017-10-20T20:34:04.682+0530 I NETWORK [thread1] Starting new replica set monitor for MEANbeta-shard-0/meanbeta-shard-00-00-sshqm.mongodb.net:27017,meanbeta-shard-00-01-sshqm.mongodb.net:27017,meanbeta-shard-00-02-sshqm.mongodb.net:27017
2017-10-20T20:34:04.682+0530 I NETWORK [ReplicaSetMonitorWatcher] starting
2017-10-20T20:34:07.708+0530 W NETWORK [thread1] No primary detected for set MEANbeta-shard-0
2017-10-20T20:34:11.095+0530 W NETWORK [thread1] No primary detected for set MEANbeta-shard-0
2017-10-20T20:34:14.516+0530 W NETWORK [thread1] No primary detected for set MEANbeta-shard-0
2017-10-20T20:34:16.637+0530 W NETWORK [ReplicaSetMonitorWatcher] No primary detected for set MEANbeta-shard-0
2017-10-20T20:34:20.056+0530 W NETWORK [thread1] No primary detected for set MEANbeta-shard-0
2017-10-20T20:34:20.056+0530 E QUERY [thread1] Error: connect failed to replica set MEANbeta-shard-0/meanbeta-shard-00-00-sshqm.mongodb.net:27017,meanbeta-shard-00-01-sshqm.mongodb.net:27017,meanbeta-shard-00-02-sshqm.mongodb.net:27017 :
我是 MongoDB 及其副本集概念的新手,请帮助我。
谢谢
【问题讨论】:
-
更新Mongo Shell后突然就可以了
标签: mongodb shell mongo-shell