作者热门文章
- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我想试试 mongodb 副本集。我按照《MongoDB:权威指南》的步骤。
$ mongo --nodb
然后在 mongo shell 中:
replicaSet = new ReplicaSet({nodes: 3})
replicaSet.startSet()
然后终端重复输出这个:
[rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
什么问题?
最佳答案
你需要做的
rs.initiate()
你也可以这样试试
replicaSet.startSet();replicaSet.initiate()
http://docs.mongodb.org/manual/reference/method/rs.initiate/
Initiates a replica set. Optionally takes a configuration argument in the form of a document that holds the configuration of a replica set.
关于mongodb - MacOS [rsStart] replSet 无法从自身或任何种子 (EMPTYCONFIG) 获取 local.system.replset 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25929470/
我想试试 mongodb 副本集。我按照《MongoDB:权威指南》的步骤。 $ mongo --nodb 然后在 mongo shell 中: replicaSet = new ReplicaSet
我是一名优秀的程序员,十分优秀!