Mongodb setFeatureCompatibilityVersion command not found

mongodbmongodb-3.2mongodb-3.4

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

3.2.20

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

Best Answer

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.