【问题标题】:command voteCommitIndexBuild requires authentication命令 voteCommitIndexBuild 需要身份验证
【发布时间】:2021-04-10 04:58:45
【问题描述】:

我已经安装在 synology docker Rocket.chat 和 mongo 中。一切正常。 但是容器每秒都会生成消息。 这给磁盘系统带来了压力。 我征求意见并纠正这个错误。作为最后的手段,如何禁用将这些消息写入磁盘?

"2021-01-04 08:49:57,stdout,"{"t":{"$date":"2021-01-04T11:49:57.752+03:00"},"s": "I", "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-2","msg":"'voteCommitIndexBuild' 命令失败。","attr":{"indexBuildUUID": {"uuid":{"$uuid":"d90def3b-4dc1-4cce-aa19-53c3f7eb094e"}},"responseStatus":{"operationTime":{"$timestamp":{"t":1609750196,"i" :1}},"ok":0.0,"errmsg":"command voteCommitIndexBuild requires authentication","code":13,"codeName":"Unauthorized","$clusterTime":{"clusterTime":{"$timestamp ":{"t":1609750196,"i":1}},"signature":{"hash":{"$binary":{"base64":"RtULaapbdm/5ooRgGl6jfYeyu4k=","subType":"0 "}},"keyId":6890507829308817412}}}}} "2021-01-04 08:49:57,stdout,"{"t":{"$date":"2021-01-04T11:49:57.649+03:00"},"s":"I" , "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-1","msg":"'voteCommitIndexBuild' 命令失败。","attr":{"indexBuildUUID":{"uuid ":{"$uuid":"5038dec8-d17f-49a7-afe8-896d37876686"}},"responseStatus":{"operationTime":{"$timestamp":{"t":1609750196,"i":1} },"ok":0.0,"errmsg":"command voteCommitIndexBuild 需要认证","code":13,"codeName":"Unauthorized","$clusterTime":{"clusterTime":{"$timestamp":{ "t":1609750196,"i":1}},"signature":{"hash":{"$binary":{"base64":"RtULaapbdm/5ooRgGl6jfYeyu4k=","subType":"0"}} ,"keyId":6890507829308817412}}}}} "2021-01-04 08:49:57,stdout,"{"t":{"$date":"2021-01-04T11:49:57.648+03:00"},"s":"I" , "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"'voteCommitIndexBuild' 命令失败。","attr":{"indexBuildUUID":{"uuid ":{"$uuid":"7b61f52d-9904-4dc8-9b06-aedb8fcadfad"}},"responseStatus":{"operationTime":{"$timestamp":{"t":1609750196,"i":1} },"ok":0.0,"errmsg":"command voteCommitIndexBuild 需要认证","code":13,"codeName":"Unauthorized","$clusterTime":{"clusterTime":{"$timestamp":{ "t":1609750196,"i":1}},"signature":{"hash":{"$binary":{"base64":"RtULaapbdm/5ooRgGl6jfYeyu4k=","subType":"0"}} ,"keyId":6890507829308817412}}}}} "2021-01-04 08:49:56,stdout,"{"t":{"$date":"2021-01-04T11:49:56.751+03:00"},"s":"I" , "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-2","msg":"'voteCommitIndexBuild' 命令失败。","attr":{"indexBuildUUID":{"uuid ":{"$uuid":"d90def3b-4dc1-4cce-aa19-53c3f7eb094e"}},"responseStatus":{"operationTime":{"$timestamp":{"t":1609750186,"i":2} },"ok":0.0,"errmsg":"command voteCommitIndexBuild 需要认证","code":13,"codeName":"Unauthorized","$clusterTime":{"clusterTime":{"$timestamp":{ "t":1609750186,"i":2}},"signature":{"hash":{"$binary":{"base64":"2TFFt43KcKYAPhR+rXwog/vqyOI=","subType":"0" }},"keyId":6890507829308817412}}}}} "2021-01-04 08:49:56,stdout,"{"t":{"$date":"2021-01-04T11:49:56.647+03:00"},"s":"I" , "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-1","msg":"'voteCommitIndexBuild' 命令失败。","attr":{"indexBuildUUID":{"uuid ":{"$uuid":"5038dec8-d17f-49a7-afe8-896d37876686"}},"responseStatus":{"operationTime":{"$timestamp":{"t":1609750186,"i":2} },"ok":0.0,"errmsg":"command voteCommitIndexBuild 需要认证","code":13,"codeName":"Unauthorized","$clusterTime":{"clusterTime":{"$timestamp":{ "t":1609750186,"i":2}},"signature":{"hash":{"$binary":{"base64":"2TFFt43KcKYAPhR+rXwog/vqyOI=","subType":"0" }},"keyId":6890507829308817412}}}}} "2021-01-04 08:49:56,stdout,"{"t":{"$date":"2021-01-04T11:49:56.645+03:00"},"s":"I" , "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"'voteCommitIndexBuild' 命令失败。","attr":{"indexBuildUUID":{"uuid ":{"$uuid":"7b61f52d-9904-4dc8-9b06-aedb8fcadfad"}},"responseStatus":{"operationTime":{"$timestamp":{"t":1609750186,"i":2} },"ok":0.0,"errmsg":"command voteCommitIndexBuild requires authentication","code":13,"codeName":"Unauthorized","$clusterTime":{"clusterTime":{"$timestamp":{ "t":1609750186,"i":2}},"signature":{"hash":{"$binary":{"base64":"2TFFt43KcKYAPhR+rXwog/vqyOI=","subType":"0" }},"keyId":6890507829308817412}}}}}

【问题讨论】:

    标签: authentication command


    【解决方案1】:

    在 MongoDB 4.4 副本集的非 Docker 安装中,我遇到了同样的问题。当您尝试恢复数据库/集合并且 Mongo 无法建立索引时,错误消息出现(过于频繁)。它无法索引的原因是副本集成员缺乏(或不正确的)身份验证。

    这就是我解决问题的方法:

    1. 创建一个密钥文件,Mongo 将使用该密钥文件对其副本集成员进行身份验证。

      openssl rand -base64 756 > <path-to-keyfile>

      chmod 400 <path-to-keyfile>

      确保文件归运行 Mongo 的用户所有。

    2. 在 mongod.conf 中添加/取消注释以下行后重新启动 Mongo:

      security:

      keyFile: <path-to-keyfile>

    这些步骤应该首先从次要成员开始,对副本集的所有成员进行。

    【讨论】:

      猜你喜欢
      • 2019-03-25
      • 2022-01-10
      • 2019-12-17
      • 2019-07-20
      • 2021-11-22
      • 2020-08-15
      • 2019-09-02
      • 2015-11-13
      • 2020-11-26
      相关资源
      最近更新 更多