Upgrade mongodb from 4.0 to 4.4 failed to load existing data
MongoDB doesn't support skipping versions. In order to upgrade from 4.0 to 4.4 you will either need to:
- upgrade from 4.0 to 4.2 first, and then from 4.2 to 4.4
or - export all of your data from 4.0, install 4.4, then import the data.
Using brew upgrade Mongo update from 3.4 to 4.0 error: The data files need to be fully upgraded to version 3.6 before attempting an upgrade to 4.0
I need to downgrade MongoDB to 3.4. Clean up all the versions. Then upgrade to 3.6 and 4.0 step by step.
First of all, back up your /data/db, just in case.
The following steps are from my experience, I used brew to install/uninstall mongodb.
I followed the instruction from this thread, but run the following steps on iMac.
Error while upgrading Mongodb from 3.2 to 3.6
Uninstall your current mongodb
brew uninstall mongodb
Install mongodb 3.4 version
brew install mongodb@3.4
Start mongod 3.4 version (when you install the old version like above, you need the full path to run it.)
/usr/local/opt/mongodb@3.4/bin/mongod
Start mongo 3.4 version
/usr/local/opt/mongodb@3.4/bin/mongo
Run the important command
> db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )
Quit
>quit();
Terminate the mongod
Find PID of mongod process using $ top
Kill the process by $ kill <PID> (the Mongo docs have more info on this)
Uninstall mongodb 3.4
brew uninstall mongodb@3.4
Repeat the above steps for 3.6
Install mongodb 3.6 version
brew install mongodb@3.6
Start mongod 3.6 version
/usr/local/opt/mongodb@3.6/bin/mongod
Start mongo 3.6 version
/usr/local/opt/mongodb@3.6/bin/mongo
Run the important command
> db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )
...
Last, after uninstall 3.6, then you can install the most current version, 4.x, you don't have to specify the @4.x etc., just
Install the most current version
brew install mongodb
Mongodb-community error homebrew.mxcl.mongodb-community.plist
Hello so running sudo brew services start mongodb-community
fixed it after stopping mongodb.
Ubuntu 18.04 MongoDB Error core-dump status=6/ABRT
"This version of MongoDB is too recent to start up on the existing data files. Try MongoDB 4.2 or earlier."
Logs above indicate you have to downgrade to MongoDB 4.2 or earlier
Since your existing data was created using MongoDB version <= 4.2
Try downgrading to 4.2 and see if it works.
Installing MongoDB with Homebrew
Formula mongodb
has been removed from homebrew-core. Check pr-43770 from homebrew-core
To our users: if you came here because mongodb stopped working for you, we have removed it from the Homebrew core formulas since it was migrated to a non open-source license.
Fortunately, the team of mongodb is maintaining a custom Homebrew tap. You can uninstall the old mongodb and reinstall the new one from the new tap.
# If you still have the old mongodb installed from homebrew-core
brew services stop mongodb
brew uninstall homebrew/core/mongodb
# Use the migrated distribution from custom tap
brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community
Check mongodb/homebrew-brew for more info.
mongo - couldn't connect to server 127.0.0.1:27017
This error is what you would see if the mongo shell was not able to talk to the mongod server.
This could be because the address was wrong (host or IP) or that it was not running. One thing to note is the log trace provided does not cover the "Fri Nov 9 16:44:06" of your mongo timestamp
.
Can you:
- Provide the command line arguments (if any) used to start your
mongod process - Provide the log file activity from the mongod startup as well as
logs during the mongo shell startup attempt? - Confirm that your mongod process is being started on the same
machine as the mongo shell?
Related Topics
How to Export a Symbol from an External Module
Tickless Kernel, Isolcpus,Nohz_Full,And Rcu_Nocbs
Linux Core Dumps Are Too Large!
How to Make Unix Binary Self-Contained
While Using Printf How to Escape Special Characters in Shell Script
How to Check If Linux Console Screensaver Has Blanked Screen
Systemd/Udev Dependency Failure When Auto Mounting Separate Partition During Startup
Swift on Linux: Make Very First Step Work
How I Install Specific Fonts on My Aws Ec2 Instance
Installing Rpostgresql on Linux
Libv4L2: Error Turning on Stream: No Space Left on Device
Gdb/Ddd Program Received Signal Sigill
How to Remove Warning: Link.Res Contains Output Sections; Did You Forget -T
Why Doesn't Time() from Time.H Have a Syscall to Sys_Time
How to Create a Core File for My Crashed Program