0

I have 2 node replica-set

Vm1 - Primary 10.1.0.2 Priority = 2

Vm2 - Secondary 10.1.0.3 Priority = 1

Now I am trying to add a new node (Vm3 10.1.0.4 - Secondary Priority = 0) based on Data folder from Secondary. (I stopped the mongod on secondary, then create a snapshot)

Now when I add the Vm3 on my replica set when I check the mongod.log here is the error:

{"t":{"$date":"2022-06-06T22:05:13.172+08:00"},"s":"I", "c":"NETWORK", "id":22990, "ctx":"conn268","msg":"DBException handling request, closing client connection","attr":{"error":"NotWritablePrimary: Not-primary error while processing 'find' operation on 'investastock_ta' database via fire-and-forget command execution."}}

There is also an error that the node is too stale to use candidate as a sync source

0

1 Answer 1

1

Already fixed. The copy should be from the PRIMARY and not from a SECONDARY node. No downtime needed in my end even if the PRIMARY node is running when I took a snapshot. Running on MongoDB 4.4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.