i have the same issue as described in this Topic
Wekan: failed upgrade from 7.49 to 7.51
the topic is closed after 15 days without a solution, and now?
i have the same issue as described in this Topic
the topic is closed after 15 days without a solution, and now?
It seems no one is maintaining it…(?).
I get the same error and I can’t even restore from back up. I think the version of mongodb is somehow not compatible anymore?
Same problem on my side, exposed here. It’s a real shame not even to be able to recover saved data
I hope a yunohost apps member is maintaining it.
Because someone has built and released this update.
I had a lot if issues with wekan and mongodb. The issues came from a featureCompatibilityVersion
fixed at 4.4 but I was using mongodb 7.0 which doesn’t support compatibility 4.4 anymore.
mongod --version
tail -n 50 /var/log/mongodb/mongod.log
Check if you see something like this:
{"t":{"$date":"2024-07-21T21:08:41.961+02:00"},"s":"F", "c":"CONTROL", "id":20573, "ctx":"initandlisten","msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"4.4\" }. See https://docs.mongodb.com/master/release-notes/6.0-compatibility/#feature-compatibility. :: caused by :: Invalid feature compatibility version value '4.4'; expected '6.0' or '6.3' or '7.0'. See https://docs.mongodb.com/master/release-notes/6.0-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 6.0, see the documentation on upgrading at https://docs.mongodb.com/master/release-notes/6.0/#upgrade-procedures."}}
if yes, tell me and I will give you the commands I used to fix it.
If not, copy/paste the log here and I’ll try to check for you
Hi,
# mongod --version
db version v6.0.15
Build Info: {
"version": "6.0.15",
"gitVersion": "7494119c41ca4e13b493e9f048df4032164e860e",
"openSSLVersion": "OpenSSL 1.1.1w 11 Sep 2023",
"modules": [],
"allocator": "tcmalloc",
"environment": {
"distmod": "debian11",
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
# tail -n 50 /var/log/mongodb/mongod.log
{"t":{"$date":"2024-07-29T08:42:14.738+02:00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"Using the XFS filesystem is strongly recommended with the WiredTiger stora
ge engine. See http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]}
{"t":{"$date":"2024-07-29T08:42:14.807+02:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=7444M,session_max=
33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,remove=true,path=journal,compressor=snappy),builtin_extension_config=(zstd=(compression_lev
el=6)),file_manager=(close_idle_time=600,close_scan_interval=10,close_handle_minimum=2000),statistics_log=(wait=0),json_output=(error,message),verbose=[recovery_progress:1,checkpoint_progres
s:1,compact_progress:1,backup:0,checkpoint:0,compact:0,evict:0,history_store:0,recovery:0,rts:0,salvage:0,tiered:0,timestamp:0,transaction:0,verify:0,log:0],"}}
{"t":{"$date":"2024-07-29T08:42:16.836+02:00"},"s":"I", "c":"STORAGE", "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":2029}}
{"t":{"$date":"2024-07-29T08:42:16.836+02:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"
t":0,"i":0}}}}
{"t":{"$date":"2024-07-29T08:42:17.249+02:00"},"s":"W", "c":"CONTROL", "id":22120, "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to d
ata and configuration is unrestricted","tags":["startupWarnings"]}
{"t":{"$date":"2024-07-29T08:42:17.249+02:00"},"s":"W", "c":"CONTROL", "id":22178, "ctx":"initandlisten","msg":"/sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest settin
g it to 'never' in this binary version","tags":["startupWarnings"]}
{"t":{"$date":"2024-07-29T08:42:17.249+02:00"},"s":"W", "c":"CONTROL", "id":5123300, "ctx":"initandlisten","msg":"vm.max_map_count is too low","attr":{"currentValue":65530,"recommendedMini
mum":102400,"maxConns":51200},"tags":["startupWarnings"]}
{"t":{"$date":"2024-07-29T08:42:17.501+02:00"},"s":"F", "c":"CONTROL", "id":20573, "ctx":"initandlisten","msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an invalid f
eatureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"4.4\" }.
See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility. :: caused by :: Invalid feature compatibility version value, expected '5.0' or '5.3' or '6.0. See
https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 5.0, see the documentation on upgrading at http
s://docs.mongodb.com/master/release-notes/5.0/#upgrade-procedures."}}
So I indeed get a compatibility problem.
OK so this is a compatibility problem: Invalid feature compatibility version value, expected '5.0' or '5.3' or '6.0'
but
featureCompatibilityVersion
version is 4.4
.
The idea is to uninstall mongodb 6.0 to go back to version 5 so we will be able to change “featureCompatibilityVersion” to “5.0” which is compatible with mongodb 6.0 then reinstall mongodb 6.0
Backup your whole server and/or DB files located in /var/lib/mongodb
Copy the mongodb apt list file locate in /etc/apt/sources.list.d/mongodb-org-6.0.list
Stop and remove mongodb (this should not delete DB files)
sudo systemctl stop mongod
sudo apt-get purge mongodb-org*
sudo apt-get autoremove
Import MongoDB 5.0 key
wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
Create an apt file list for MongoDB 5.0
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
Install MongoDB 5.0
sudo apt-get update
sudo apt-get install -y mongodb-org
Start MongoDB
sudo systemctl start mongod
sudo systemctl enable mongod
Check MongoDB status (should be running)
sudo systemctl status mongod
Check MongoDB version
mongod --version
Check logs
sudo tail -n 50 /var/log/mongodb/mongod.log
Here you can have rights problems. Fix them using:
sudo chown -R mongodb:mongodb /var/lib/mongodb
sudo chmod -R 755 /var/lib/mongodb
sudo systemctl restart mongod
Check status and logs
sudo systemctl status mongod
sudo tail -n 50 /var/log/mongodb/mongod.log
Repair your DB
mongod --dbpath /var/lib/mongodb --port 27018 --repair
Start mongodb and connect to it. Will use another port so we have no conflict with port 27017 (he “&” will start mongo as background task)
mongod --dbpath /var/lib/mongodb --port 27018 &
mongo --port 27018
Now than you can connect to mongo, change featureCompatibilityVersion
to 5.0:
db.adminCommand({ setFeatureCompatibilityVersion: "5.0" })
Check it with
db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })
Than stop MongoDB using
db.adminCommand({ shutdown: 1 })
Remove mongodb 5.0 and reinstall 6.0
systemctl stop mongod
apt remove mongodb-org
apt autoremove
restore /etc/apt/sources.list.d/mongodb-org-6.0.list then install mongodb and repair DB
sudo apt-get update
sudo apt-get install -y mongodb-org
mongod --dbpath /var/lib/mongodb --port 27018 --repair
Start MongoDB and enable it
sudo systemctl start mongod
sudo systemctl enable mongod
Check MongoDB status (should be running)
sudo systemctl status mongod
Check MongoDB version
mongod --version
Check logs
sudo tail -n 50 /var/log/mongodb/mongod.log
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.