Watch keynotes and sessions from MongoDB.live, our virtual developer conference.

How to set featureCompatibilityVersion on secondary replica set member which does not startup due to this error?

How to set featureCompatibilityVersion on secondary replica set member which does not startup due to this error? I am basically trying to resync a broken secondary. I have removed all the data and restarted the service but keep getting this error. I can see that featureCompatibilityVersion is set to 3.6 which the other are set to 3.4. I know this from starting the server up outside the set. However the second I add the server to replica set again I get the same error meaning I can’t change featureCompatibilityVersion to 3.4 since the server will not start. How do I fix this this catch 22 situation? Do I have to remove auth settings during syncing?

Thanks in advance for any help.

----Error

Initial sync attempt failed – attempts left: 9 cause: IncompatibleServerVersion: Sync source had unsafe feature compatibility version: downgrading to 3.4

2020-02-11T15:46:56.115+0000 I REPL [replication-1] Initial Sync Attempt Statistics: { failedInitialSyncAttempts: 1, maxFailedInitialSyncAttempts: 10, initialSyncStart: new Date(1581436015001), initialSyncAttempts: [ { durationMillis: 0, status: “IncompatibleServerVersion: Sync source had unsafe feature compatibility version: downgrading to 3.4”, syncSource: “10.35.5.65:27017” } ] }

Can you post the error?

Added error. This is what I see when it just loops round and round

Looks strange. I’d be tempted to change the binary to 3.4, Sync, and take it back to the 3.6 binary.

Once back on 3.6 you should complete upgrading by setting the featureCompatibility to 3.6

Thanks. The other servers are set to binary=3.6 but feature=3.4. Should I not leave it like that? I would have to update all of them, is this correct?

Is there any way this will corrupt data?

Try setting the fetaureCompatibilityVersion on the cluster to 3.6 and add the node.

The data on this node is useless anyway, as it is attempting initial syncs(no data loss as it is alreay gone). You should only need to use 3.4 on this node.

Your last option(?) is to seed this nodes data from backup/snapshot from a current node.