Election issue when system time rollback

Hello, My env is 3 nodes centos cluster, my mongodb version is 2.6…when I use replica set in 3 nodes cluster, I adjuest system time rollback for 3 hours, and I stop the primary node mongod server, it failed to elect the new primary between the rest two secondary nodes

Hi @Xu_Han and welcome in the MongoDB Community :muscle: !

What does this mean? What command did you run?

Also, MongoDB 2.6 reached End Of Life in October 2016 and isn’t supported since then.
Please upgrade to a more recent version of MongoDB.

Cheers,
Maxime.

1 Like

Hello @MaBeuLux88

Thanks for your reply, I run date --set="-3 hours" in each node, then I run systemctl stop mongod to stop the primary node mongod service, the rest of two secondary nodes can’t trigger the election to elect the new primary. It start election and elect the primary 3 hours later. I test this condition in Mongodb version 3.2 too, ver 3.2 still has this kind of issue. But the latest 4.4 is Ok

Thanks,
Xu

The nodes probably thought they couldn’t be elected because they had more recent entries in the oplog. Old stuff die hard :slight_smile:. This was fixed at some point apparently.

The real solution in an update :slight_smile:.

Cheers,
Maxime.

1 Like

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