I needed to upgrade mongodb from 3.2 to 3.6 in my environment. For the process i first migrated from 3.2 to 3.4 as recommended. After successful migration to 3.4, i started migration to 3.6 i am not able to start mongod. When checked log file i found error like:
IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details.
MY Mongod.conf
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
storage:
dbPath: /var/lib/mongo
journal:
enabled: true
processManagement:
fork: true # fork and run in background
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
net:
port: 27017
bindIp: 127.0.0.1
Best Answer
I have similar problem, I've upgraded on Ubuntu 16.04 from MongoDB 3.4 to 3.6 but I missed this important step
Then I must downgrade to 3.4 to do it and then upgrade to 3.6 again. Here is the detail steps:
1. Uninstall 3.6
Backup
/etc/mongod.conf
Backup
/etc/apt/sources.list.d/mongodb-org-3.6.listed
(rename or move it to another folder)2. Re-install 3.4
Check folder
/etc/apt/sources.list.d/
to see if this file exists or not:mongodb-org-3.4.list
. If it does not exist, you can re-create by this command:then install by
apt-get
In my case the command
systemctl start mongod
return errorFailed to start mongod.service: Unit mongod.service not found
I resolved by these commands:3. Execute very important command
After downgrade to 3.4, run this
4. Upgrade 3.6 again
Restore this file
/etc/apt/sources.list.d/mongodb-org-3.6.listed
Restore
/etc/mongod.conf
. Now, MongoDB 3.6 started without any problem