Reputation: 1
Can't find much related information about this error but maybe someone here can explain it to me.
Hosting version 3.6 Mongodb replica set with master/slave and arbiter setup. Im trying to upgrade my cluster to 4.2 version. Quite straightforward process. First upgrade your nodes one by one to 4.0 and then 4.2. Set compabilty version to 4.0 and later 4.2 if everything goes as expected.
This process works well until I´m trying to upgrade arbiter to 4.2. Before that I verified arbiter compabilty version which was 4.0 But right after I install 4.2 packages to Arbiter it goes down and I get this error from logs, - "2021-01-08T15:02:17.282+0200 F CONTROL [initandlisten] ** IMPORTANT: UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: BadValue: Invalid value for version, found 3.6, expected '4.2' or '4.0'. " But as I mentioned I verified its featureCompatibilityVersion before I upgraded to 4.2.
Current workaround to get arbiter working is to take it off from replica set and set and manually re set featureCompatibilityVersion and later adding it back to replica set.
Is it expected behaviour or Im doing stmh wrong in my process ?
Upvotes: 0
Views: 761
Reputation: 709
I had exactly this problem, and eventually narrowed down the cause to be the arbiter having data stored on it before trying to upgrade. In our case, the arbiter had users added before it become an arbiter (as they wouldn't have been able to be added afterwards). The users get stored in the arbiter's data directory, and it appears this not a valid state for a cluster, causing issues on upgrade.
Fix was to remove the arbiter's data directory before upgrading.
Upvotes: 0