Open programthis opened 2 years ago
I am in the same boat. The default mup.js sets Mongo to 3.4.1, but the latest release of Meteor forces an update.
I've been looking at:
http://meteor-up.com/docs.html#change-mongodb-version
Which led me to:
https://docs.mongodb.com/manual/release-notes/5.0-upgrade-standalone/
Which seems to indicate we have to update 3.4 to 3.6 to 4.0 to 4.2 to 4.4 to 5.0.
It seems like it would be better to simply dump the DB, re-install Mongo from scratch with 5.0, and then re-initialize the database
@zodern Any thoughts or hints on how to proceed?
Let me ask another question. If there are no other issues with the migration, is it enough to:
db.shutdownServer()
.mup deploy
Or are there other steps I'm missing?
Those docs are a little out of date (they work, but there are now more convenient ways for some of the steps).
In your case if all you need to do is change the version, you can simplify the steps to:
mup setup
to restart MongoDB and switch to the new versionThe full instructions would be:
mup mongo shell
mup setup
.@philipmjohnson did you got it working? I already got a full crash when upgrading from 3.4.1 to 3.6.13 :sweat:
I got
onnecting to: mongodb://127.0.0.1:27017
2022-02-22T10:00:08.994+0000 W NETWORK [main] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2022-02-22T10:00:09.097+0000 E QUERY [main] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:234:13
@(connect):1:6
OCI runtime exec failed: exec failed: cannot exec a container that has stopped: unknown
docker logs for the container say
2022-02-22T10:05:47.028+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2022-02-22T10:05:47.188+0000 E STORAGE [initandlisten] WiredTiger error (-31802) [1645524347:188030][1:0x7fb318f09cc0], txn-recover: unsupported WiredTiger file version: this build only supports major/minor versions up to 1/0, and the file is version 3/0: WT_ERROR: non-specific WiredTiger error
2022-02-22T10:05:47.188+0000 E STORAGE [initandlisten] WiredTiger error (0) [1645524347:188196][1:0x7fb318f09cc0], txn-recover: WiredTiger is unable to read the recovery log.
2022-02-22T10:05:47.188+0000 E STORAGE [initandlisten] WiredTiger error (0) [1645524347:188233][1:0x7fb318f09cc0], txn-recover: This may be due to the log files being encrypted, being from an older version or due to corruption on disk
2022-02-22T10:05:47.188+0000 E STORAGE [initandlisten] WiredTiger error (0) [1645524347:188285][1:0x7fb318f09cc0], txn-recover: You should confirm that you have opened the database with the correct options including all encryption and compression options
2022-02-22T10:05:47.188+0000 E STORAGE [initandlisten] WiredTiger error (-31802) [1645524347:188354][1:0x7fb318f09cc0], txn-recover: Recovery failed: WT_ERROR: non-specific WiredTiger error
2022-02-22T10:05:47.195+0000 I - [initandlisten] Assertion: 28595:-31802: WT_ERROR: non-specific WiredTiger error src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 267
2022-02-22T10:05:47.206+0000 I STORAGE [initandlisten] exception in initAndListen: 28595 -31802: WT_ERROR: non-specific WiredTiger error, terminating
2022-02-22T10:05:47.206+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2022-02-22T10:05:47.206+0000 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2022-02-22T10:05:47.206+0000 I NETWORK [initandlisten] shutdown: going to flush diaglog...
2022-02-22T10:05:47.206+0000 I CONTROL [initandlisten] now exiting
2022-02-22T10:05:47.206+0000 I CONTROL [initandlisten] shutting down with code:100
@zodern is there a way to simply "wipe" mongo from the system and do a fresh new install?
@jankapunkt Here's some documentation I wrote for our system. One section explains how to wipe mongo:
https://www.radgrad.org/docs/developers/deployment/howto/update-mongo-mup
Yes, we did get it working.
@philipmjohnson thanks a lot that worked very well! One note though (for others reading this) - make sure to read the mongorestore
documentation as the it behaves slightly different for Mongo 5, for example the --db
and --collection
options are now replaces by --nsInclude
.
After correcting the mongorestore
options the DB has been restored and everything is running as expected.
Mup version (
mup --version
): 1.5.5Mup config
Output of command