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:
rs.remove(<host>)
rs.remove(<host>, {force: true})
rs.reconfig(confWithout2ndArbiter)
rs.reconfig(confWithout2ndArbiter, {force: true})
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!
2
Answers
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.
If using MongoDB 5.3 or later forbid multiple arbiters with
mongod --setParameter allowMultipleArbiters=false
You could also try a forceful reconfiguration of the replica set:
rs.reconfig(confWithout2ndArbiter, {force : true})