繁体   English   中英

集群中的MongoDB身份验证

[英]MongoDB authentication in a cluster

我设法通过身份验证配置了MongoDB集群。 我的意思是说,我激活了授权:使用本地主机异常机制对数据副本集中的所有mongod和配置副本集中的所有mongod 启用授权 我的问题是现在的蒙哥斯 当我启动mongos实例时,我会遇到一些关于身份验证的错误,例如:

[replSetDistLockPinger] pinging failed for distributed lock pinger :: caused by :: Unauthorized: not authorized on config to execute command { findAndModify: "lockpings", query: { _id: "as-nscl-01:27017:1475328403:-980595768" }, update: { $set: { ping: new Date(1476088485351) } }, upsert: true, writeConcern: { w: "majority", wtimeout: 15000 }, maxTimeMS: 30000 }
[UserCacheInvalidator] An error occurred while fetching current user cache generation to check if user cache needs invalidation: Unauthorized: not authorized on admin to execute command { _getUserCacheGeneration: 1, maxTimeMS: 30000 }

我的问题是我现在不知道该怎么办。 我在文档中没有看到与此相关的任何内容。 也许我需要为拥有某些权利的mongos创建一个特殊用户?

谢谢你的帮助

我终于设法使它起作用。 实际上,问题出在声明security.authorization:enabled的配置文件中。 mongos实例禁止使用此参数,它阻止了守护程序启动。 删除参数即可解决问题。 我的错误来自先前的运行。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM