Skip to main content
3 of 3
improved formatting, spelling, word choice (terminology), sentence construction, etc

MongoDB secondary node does not become primary when other nodes are stopped

I want to cluster MongoDB by using a replica set. I have created a three-node replicaset (rs0,rs1,rs2), and run the DBs in parallel with no issues. But when I shut down any two instance (one primary and secondary), the remaining secondary member is not made the primary, instead it remains as a secondary.

Step1:

  • rs0: primary
  • rs1: secondary
  • rs2: secondary

Every thing is ok. When

Step2:

  • rs0: stopped
  • rs1: stopped
  • rs2: secondary (This is not promoted to primary)

Why?

s_kumar
  • 39
  • 1
  • 2