Mongodb – UnknownError: error while getting last oplog entry for begin timestamp: find command not yet implemented

mongodbmongodb-3.0mongodb-3.4replication

I have 2 mongoDBs. One running as PRIMARY, its version is 3.0.13. The other works as SECONDARY in the replica set, its version is 3.0.11. Replication works perfectly at this point.

I want to add a 3rd mongoDB, empty data folder, and its version is 3.4.5.

Using mongo client I can access to PRIMARY and SECONDARY, and from PRIMARY I can access to this 3rd mongoDB, and from SECONDARY I can access to this 3rd mongoDB too.

In the primary, I execute rs.add("server3:27017"), and the command rs.status() displays this 3rd server in status STARTUP2. But after a while I get this error

2017-07-25T09:24:52.159+0000 I REPL     [replication-0] Initial sync attempt finishing up.
2017-07-25T09:24:52.159+0000 I REPL     [replication-0] Initial Sync Attempt Statistics: { failedInitialSyncAttempts: 0, maxFailedInitialSyncAttempts: 10, initialSyncStart: new Date(1500974688699), initialSyncAttempts: [] }
2017-07-25T09:24:52.159+0000 E REPL     [replication-0] Initial sync attempt failed -- attempts left: 9 cause: UnknownError: error while getting last oplog entry for begin timestamp: find command not yet implemented

and the daemon dies when the attempts left reaches 0.

2017-07-25T09:25:03.887+0000 F REPL     [replication-0] The maximum number of retries have been exhausted for initial sync.
2017-07-25T09:25:03.899+0000 E REPL     [replication-1] Initial sync failed, shutting down now. Restart the server to attempt a new initial sync.
2017-07-25T09:25:03.899+0000 I -        [replication-1] Fatal assertion 40088 UnknownError: error while getting last oplog entry for begin timestamp: find command not yet implemented at src/mongo/db/repl/replication_coordinator_impl.cpp 635
2017-07-25T09:25:03.899+0000 I -        [replication-1] 

***aborting after fassert() failure

what does it mean this find command not yet implemented? any workaround for having this 3rd server joined in the replica set?

Best Answer

You cannot add a MongoDB 3.4.x member to a MongoDB 3.0.x replica set.

Replication between mixed versions is only supported for adjacent MongoDB major releases (for example, 3.0 and 3.2 or 3.2 and 3.4), and even then generally only intended to be used transiently for the purposes of a rolling upgrade.

what does it mean this find command not yet implemented?

The find command was introduced in the MongoDB 3.2 production release series, and MongoDB 3.4 replication expects this command to be available.

any workaround for having this 3rd server joined in the replica set?

Install MongoDB 3.0 or 3.2 for compatibility with your existing MongoDB 3.0 replica set members. If you add a new member with MongoDB 3.2, I would recommend upgrading your other replica set members to the same release version.

For more information see: