I'm trying to change Replica Set Protocol to pv1. I have 5 replica set servers Mongo 3.6. I'm using the documentation from here https://docs.mongodb.com/manual/reference/replica-set-protocol-versions/ to make those changes.

The documentation is pretty clear and operation seems simple https://docs.mongodb.com/manual/reference/replica-set-protocol-versions/#modify-replica-set-protocol-version. On PRIMARY server I executed this three commands:

cfg = rs.conf();

After doing it I'm getting :

    "ok" : 1,
    "operationTime" : Timestamp(1531825299, 3),
    "$clusterTime" : {
        "clusterTime" : Timestamp(1531825299, 3),
        "signature" : {
            "hash" : BinData(0,"AIwmnD882cUdRgKYgGsRZg9Z4q0="),
            "keyId" : NumberLong("6577197549977862145")

Everything looks good, but after relogin to mongo I can see this:

MongoDB shell version v3.6.6
connecting to: mongodb://
MongoDB server version: 3.6.6
Server has startup warnings: 
2018-07-10T22:50:39.164+0200 I REPL     [replexec-0] 
2018-07-10T22:50:39.164+0200 I REPL     [replexec-0] ** WARNING: This replica set was configured with protocol version 0.
2018-07-10T22:50:39.164+0200 I REPL     [replexec-0] **          This protocol version is deprecated and subject to be removed 
2018-07-10T22:50:39.164+0200 I REPL     [replexec-0] **          in a future version.

I don't know what I'm doing wrong? Any help why this operation doesn't work ?

  • Is there something left in a config file since those are startup warnings. – Breadtruck Jul 20 '18 at 5:33
  • @Breadtruck what do you mean? The configuration file didn't change and it was the same before upgrade to 3.6. – B14D3 Jul 31 '18 at 5:51
  • I am not sure anymore, but it says in the 3.6 documentation ... Starting in MongoDB 3.2, new replica sets use protocolVersion: 1 by default. Previous versions of MongoDB use version 0 of the protocol and cannot run as members of a replica set configuration that specifies protocolVersion 1. NOTE: MongoDB 3.6 deprecates the replica set protocol version 0. .... So I was basically thinking that you really still had the member set to 0 based on the warning , even though you made the changes, and I was thinking you could have something in the service config that was still out of line – Breadtruck Aug 6 '18 at 22:45

You need to restart the mongod service after rs.reconfig(cfg). The reconfig will change the protocol version but it will be active after the restart. First you need to restart the secondary, then do a stepdown for the primary and restart it also. After that you will not see the warning anymore.

  • surprisingly, that's worked :) thx :) – B14D3 Sep 9 '18 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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