others-Mongodb replica set this node is not electable under the new configuration
1. The purpose of this post
Sometimes, when we initialize the replica set of mongodb, we got this error:
2. Environments
Mongodb 3.x
3. How to fix this error
This error occurred because you tried to initialize the replica set in the arbiter node, you should login to other node to initialize it, or you can change your arbiter node:
3.1 Login to other node
This time we use 1.1.1.21 node to initialize the replica set:
3.2 Change your arbiter node
Or else, you can change your arbiter node like this:
4. Conclusion
Mongodb is a fast and leading no-sql database for users. If you want to initialize the replica set ,make sure not to do this job on the arbiter node.