gfunk
gfunk

Reputation: 612

Unable to elect primary after secondary taken offline Mongo

I have a replica setup with 1 Arbiter and 3 Mongo Databases.

2 of the databases (db1 and db2) I have given an equal priority of becoming primary, and the third one (db3) I have a priority of 0.

I am trying to take db3 offline to copy the data to another server, but every time I run db.shutdownServer() in db3, it causes db1 and db2 to become secondaries, and they remain stuck in this configuration.

It's my understanding that reelection only takes place when Primaries become unavailable.

Am I missing something??

Upvotes: 0

Views: 128

Answers (1)

gfunk
gfunk

Reputation: 612

So what was actually happening was I had added 3 other databases (shutdown) in hidden mode which were going to become my next replica set. Apparently Mongo has a setting where if the number of shutdown dbs > running dbs, the replica set goes into read-only mode, so obviously every time I would shutdown db3 this would trigger this to take place.

Upvotes: 0

Related Questions