Stuck with secondary only in replica set

I’m stuck in a situation where only one of the three nodes in my replica set is healthy and is stuck as secondary. I’m unable to force it to become primary via rs.reconfig as there is no primary for me to run this on.

This node was previously primary while my other two nodes were rebuilt. Now it is the only surviving node with the latest data and has become unusable.

What is my way out of this?

Hi @timw,

In this situation you can follow the tutorial on forced reconfiguration: Reconfigure a Replica Set with Unavailable Members.

Per the description in the tutorial, this is a last resort procedure:

The force option forces a new configuration onto the member. Use this procedure only to recover from catastrophic interruptions. Do not use force every time you reconfigure. Also, do not use the force option in any automatic scripts and do not use force when there is still a primary.

Regards,
Stennie

1 Like

That’s great, thanks!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.