Docker Community Forums

Share and learn in the Docker community.

Mongo error "command voteCommitIndexBuild requires authentication"

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}}}}}

Technical details: Using a replica set with auth enabled but without a way for nodes to authenticate to one another is not a supported configuration, but there is currently nothing in the code that warns you about this situation if you only have one node up in your replica set. Note that other operations besides createIndexes would identify this problem; for example, adding a non-voting node to a one-node replica set would seem to succeed, and yet nothing would replicate to the new node. There is no active indication anything is wrong in this situation other than error messages appearing in the system log (and the lack of new data on the newly added node). This problem is not new to 4.4 and has existed since probably 2.2 and prior. The change in behavior for createIndexes, however, is new in 4.4.

To make this problem more noticeable for createIndexes, we cannot fix the problem when the node goes to voteCommitIndexBuild, as at that point it is too late to abort the index build. Instead, what we can do is add a check on startup that a replicaset node can talk to itself, and abort initialization if this check fails, with an explanatory message. This will prevent surprise behaviors like this in the future, since there exists a wide variety of failure cases when running a single-voting-node replica set with an incorrect authentication configuration, and it would be difficult to document all of them and keep such a list up to date for each release.

Thank you.
I managed my problem by editing mongod.conf
security:
keyFile:
(https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-replica-set/)