我正在尝试在MongoDB版本3.04中创build一个副本集。 我遵循本教程 ,尝试使用主服务器添加节点时出现下一个错误:
vacrep:PRIMARY> rs.add('server address here') { "ok" : 0, "errmsg" : "Quorum check failed because not enough voting nodes responded; required 2 but only the following 1 voting nodes responded: PRIMARYSERVER:27017; the following nodes did not respond affirmatively: 'server address here':27017 failed with Missing credentials for authenticating as internal user", "code" : 74 }
到目前为止,
我发现几个关于这个错误的线程没有,但在任何一个都找不到解决scheme。 我该如何解决这个问题?
find解决scheme – 这是权限问题。
在MongoDBconfiguration文件中,我必须closures身份validation模式或使用本指南在所有节点之间创build一个共享密钥:
这是我的服务器无法互相沟通的原因。
除了上面的答案显然是正确的,下面的步骤将有助于创buildkeyFiles:
closures每个mongo实例如下:
一个。 use admin
湾 db.shutdownServer();
现在用keyFile作为参数重新启动mongo实例。
例如start "jaguar" mongod --dbpath "D:\Mongo\data\Replica Sets\Jaguar" --port 50000 --replSet "clusterset" --keyFile "D:\Mongo\data\Replica Sets\Jaguar\Key\F2AB9B2DCF7933733A35EE9C81C34"