Mongodb replica set Upgrade (PSA) version 4.4 to 5.0 community edtion

Hi everyone.

Am try to upgrade the replica (PSA) exiting 4.4 version to 5.0, am replace the 4.4 binary to 5.0 binary but below error showming please help me out…
repl1:PRIMARY> db.adminCommand({ setFeatureCompatibilityVersion: “5.0” })
“operationTime” : Timestamp(1692640723, 1),
“ok” : 0,
“errmsg” : “Invalid command argument. Expected ‘4.4’ or ‘4.2’, found 5.0 in: { setFeatureCompatibilityVersion: "5.0", lsid: { id: UUID("b7fb6c71-7ce9-4fcc-9183-7349e88833ba") }, $clusterTime: { clusterTime: Timestamp(1692640703, 2), signature: { hash: BinData(0, 1CEC2C121A7A40F17EFF499048FB0A6E9B6C6B2A), keyId: 7269796627441778693 } }, $db: "admin" }. See”,
“code” : 2,
“codeName” : “BadValue”,
“$clusterTime” : {
“clusterTime” : Timestamp(1692640723, 1),
“signature” : {
“hash” : BinData(0,“ipNigBe/XWDzYCzzE3irZ9p/ifU=”),
“keyId” : NumberLong(“7269796627441778693”)

Hi @sindhu_K,
Did you make two upgrades or did you start directly from 4.4?
Because it seems as if you did two upgrades so from 4.2 to 4.4 without doing the setFeatureCompatibility.
If you use the get, it will give you info on which one you stayed with.


Have you started the MongoDB process with version 5.0? You can verify with "db.version() and see if it’s running as v5.0 or 4.4.

The FCV doesn’t upgrade MongoDB, it just enables features for a certain release and helps with backwards compatibility. You don’t want to change the FCV until all the nodes are upgraded to 5.0.

Follow the steps here:


am upgrade 4.4 to 5.0 and mongo run at 4.4 version.

Then you will want to follow this link on the upgrade process. As mentioned you will need to completely upgrade the MongoDB servers first then change the FCV value on the cluster.

1 Like