command voteCommitIndexBuild requires authentication

Viewed 259

I have installed in synology docker Rocket.chat and mongo. Everything works well. But the container generates messages every second. This puts a strain on the disk system. I ask for advice and correct this error. As a last resort, how can I disable writing these messages to disk?

"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' command failed.","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' command failed.","attr":{"indexBuildUUID":{"uuid":{"$uuid":"5038dec8-d17f-49a7-afe8-896d37876686"}},"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.648+03:00"},"s":"I", "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-0","msg":"'voteCommitIndexBuild' command failed.","attr":{"indexBuildUUID":{"uuid":{"$uuid":"7b61f52d-9904-4dc8-9b06-aedb8fcadfad"}},"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:56,stdout,"{"t":{"$date":"2021-01-04T11:49:56.751+03:00"},"s":"I", "c":"STORAGE", "id":3856202, "ctx":"IndexBuildsCoordinatorMongod-2","msg":"'voteCommitIndexBuild' command failed.","attr":{"indexBuildUUID":{"uuid":{"$uuid":"d90def3b-4dc1-4cce-aa19-53c3f7eb094e"}},"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}}}}} "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' command failed.","attr":{"indexBuildUUID":{"uuid":{"$uuid":"5038dec8-d17f-49a7-afe8-896d37876686"}},"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}}}}} "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' command failed.","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}}}}}

1 Answers

I was facing the same issue with a non-Docker installation of MongoDB 4.4 replica set. The error message comes up (too frequently) when you are trying to restore a DB/collection and Mongo fails to index. The reason it fails to index is lack of (or improper) authentication of the replica set members.

This is how I resolved the issue:

  1. Create a keyfile using which Mongo will authenticate its replica set members.

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

    chmod 400 <path-to-keyfile>

    Make sure that the file is owned by the user with which Mongo runs.

  2. Restart Mongo after adding/uncommenting the following lines in mongod.conf:

    security:

    keyFile: <path-to-keyfile>

The steps should be done on all the members of the replica set starting from the secondary members first.

Related