mongodbmongodb-arbiter

Removing arbiter from primary-secondary-arbiter-arbiter mongodb cluster


I have a PSA (primary, secondary, arbiter) cluster on 4.4 which was working fine, however I managed to accidentally connect a second arbiter. I've tried to remove this arbiter from the primary using:

but all give the following error:

{
...
        "errmsg" : "Rejecting reconfig where the new config has a PSA topology and the secondary is electable, but the old config contains only one writable node. Refer to https://docs.mongodb.com/manual/reference/method/rs.reconfigForPSASet/ for next steps on reconfiguring a PSA set.",
        "code" : 103,
        "codeName" : "NewReplicaSetConfigurationIncompatible",
...

I've read the linked article, however my case does not fall under either of the cases where rs.reconfigForPSASet should be used and doesn't look relevant for this problem.

Does anyone know how I can remove this member?

Thanks in advance!


Solution

  • Managed to resolve this in the end by looking through the MongoDB source code. Fix was to temporarily change the priority of the secondary to 0, then remove the rogue arbiter, then change the priority of the secondary back to 1.