Mongodb 在具有密钥文件身份验证机制的mongo repl集上启动Ops Manager

Mongodb 在具有密钥文件身份验证机制的mongo repl集上启动Ops Manager,mongodb,mongodb-mms,Mongodb,Mongodb Mms,我已成功部署了一个mongo复制集,在我的三个节点之间共享一个密钥文件。 它工作正常,问题是当我尝试启动ops manager服务时: [root@xxx:/etc]# service mongodb-mms start Starting pre-flight checks Failure to connect to configured mongo instance: Config{loadBalance=false, encryptedCredentials=false, ssl='fal

我已成功部署了一个mongo复制集,在我的三个节点之间共享一个密钥文件。 它工作正常,问题是当我尝试启动ops manager服务时:

[root@xxx:/etc]# service mongodb-mms start
Starting pre-flight checks
Failure to connect to configured mongo instance: 
Config{loadBalance=false, encryptedCredentials=false, ssl='false', 
dbNames='[mmsdb, mmsdbprovisionlog, mmsdbautomation, mmsdbserverlog, 
mmsdbpings, mmsdbprofile, mmsdbrrd, mmsdbconfig, mmsdblogcollection, 
mmsdbjobs, mmsdbagentlog, mmsdbbilling, backuplogs, automationcore, 
monitoringstatus, mmsdbautomationlog, automationstatus, cloudconf, backupdb, 
mmsdbprovisioning, mmsdbqueues]', uri=mongodb://xxx1:27017,xxx2:27017,xxx3:27017} Error: Command failed with 
error 13: 'not authorized on admin to execute command { listDatabases: 1, 
$db: "admin" }' on server xxx1:27017. The full response is { "operationTime" 
: { "$timestamp" : { "t" : 1517416044, "i" : 1 } }, "ok" : 0.0, "errmsg" : 
"not authorized on admin to execute command { listDatabases: 1, $db: 
\"admin\" }", "code" : 13, "codeName" : "Unauthorized", "$clusterTime" : { 
"clusterTime" : { "$timestamp" : { "t" : 1517416044, "i" : 1 } }, "signature" : { "hash" : { "$binary" : "fh+qyjJ0L8c8zCx0U672aJdZdUw=", "$type" : "00" }, "keyId" : { "$numberLong" : "6516848947321896961" } } } }
Pre-flight checks failed. Service can not start.
我没有数据库管理的授权

我试图配置另一个repl集,在其中我对mongod.conf文件的这一部分进行了注释

security:
  keyFile: /opt/mongo/mongo-keyfile

我可以正确启动服务。有什么问题?

您的MongoDB服务器启动时启用了身份验证,但ops manager服务正在尝试连接和管理服务器,该服务器启动时使用listDatabases命令,但未经身份验证

MongoDB文档包括一个关于的有用教程,其中包括以下相关注释:

使用-keyFile命令行选项或配置文件设置运行时,将强制执行和


我认为你只需要在你的服务器上用服务mongod start运行mongod服务,你可以在这个网站上看到详细信息,我认为错误是一样的。