I'm trying to upgrade my mongodb from 3.2 to 3.4 and I try to set the compatibility version by: db.adminCommand( { setFeatureCompatibilityVersion: "3.2" } )

But it says

        "ok" : 0,
        "errmsg" : "no such command: 'setFeatureCompatibilityVersion', bad cmd: '{ setFeatureCompatibilityVersion: \"3.2\" }'",
        "code" : 59

I'm not sure why the command is not found. Can somebody point me out in whats wrong?

Here is the mongodb version info from db.serverStatus().version


P.S: I'm running the command on admin database and authenticated on it as a user with root role.

1 Answer 1


The documentation for setFeatureCompatibilityVersion shows it being new as of MongoDB 3.4, so it can't be run on a 3.2 server process: https://docs.mongodb.com/v3.4/reference/command/setFeatureCompatibilityVersion/

The upgrade steps describe that running this command should be done after the server processes have been upgraded to 3.4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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