MongoDB 3.2 replica set with arbiter version 2.6

Posted on

Question :

I have to set up a MongoDB replication set with 3 nodes, 1 of them arbiter. Authentication has to be enabled. Node1 and Node2 are fine. On the arbiter I have a 2.6 installation and it is arbiter for another configuration. I started a new mongod on that server on a different port and tried to add it to the 3.2 replication set. It is added but it says “not reachable”.

From any node I can connect to the new instance in the arbiter host so communication between servers is not a problem. I don’t see anywhere in the documentation that all the nodes must be the same version.

Any ideas what am I doing wrong? I could add a 3.2 arbiter with no problem and the replica set is working perfectly, but for some reason I cannot get it to work with a 2.6 arbiter.

Answer :

In general MongoDB only supports mixing adjacent major versions (eg. 2.6 and 3.0, 3.0 and 3.2, 3.2 and 3.4) in a replica set for the purposes of a rolling upgrade to a new version of MongoDB. Mixed version requirements are currently only mentioned in the upgrade notes but I expect the underlying assumption is that new deployments would always use start with the same version.

If you create a new replica set deployment using MongoDB 3.2, the replica set will be using a new election protocol (“version 1”) that older versions of MongoDB do not support. For more information, see: Replication Election Enhancements.

The proper solution is to add a MongoDB 3.2 arbiter to your new 3.2 replica set. For any new deployment I would definitely recommend using identical versions of MongoDB to avoid unexpected issues.

Leave a Reply

Your email address will not be published. Required fields are marked *