[英]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.