MongoDB upgrade blocks startup unless featureCompatibilityVersion is migrated from 7.0 to 8.0 #10309
What happened?When upgrading persistent data from MongoDB 7.x to 8.2 in LibreChat docker-compose setup, the MongoDB container fails to start if the featureCompatibilityVersion (FCV) was left at 7.0. Root cause
Solution/Workaround
Improvement suggestionAdd a migration tip, warning, or upgrade procedure to the documentation and changelog to guide users through FCV update before upgrading MongoDB major versions. Steps to reproduce
Version infoLibreChat: docker-compose setup Relevant log output(Include fatal error due to FCV mismatch) CommentsThis issue supersedes previous focus on the confirm:true parameter; main blocker is the FCV incompatibility, not command syntax. |
Replies: 4 comments 6 replies
|
The main problem is that after upgrading MongoDB from 8.0 to 8.2, if the featureCompatibilityVersion was left at 7.0, the MongoDB container refused to start. The process required starting with MongoDB 7.x, updating the FCV to 8.0, then switching to 8.2 for a successful start. The |
|
I can confirm. I had to modify docker-compose.override.yml to hold mongodb to 8.0 to get things working again. |
|
For people with docker setup here is a step by step:
mongodb:
image: mongo:8.0Then restart docker compose
Then run upgrade command: And exit the shell
|
|
I had the opposite issue, #11151 downgraded my mongodb instance from 8.2 to 8.0, causing the boot to fail with:
Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"8.2\" }. See https://docs.mongodb.com/master/release-notes/7.0-compatibility/#feature-compatibility. :: caused by :: Invalid feature compatibility version value '8.2'; expected '7.0' or '7.3' or '8.0'. See https://docs.mongodb.com/master/release-notes/7.0-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 7.0, see the documentation on upgrading at https://docs.mongodb.com/master/release-notes/7.0/#upgrade-procedures.
I had to use |
For people with docker setup here is a step by step:
Then restart docker compose
Then run upgrade command:
And exit the shell