0

MongoDB automatically updated to 3.6 after doing a system update and was no longer compatible with my old dataset. So I downgraded to 3.4 again, however now the mongo instance won't start at all and exits with error code 100. Any help would be appreciated.

enter image description here

robertbabington
  • 189
  • 1
  • 2
  • 10

1 Answers1

0

There were a series of issues piggybacking on one another here, but I sorted this out.

Firstly I reverted from 3.6 to 3.4 by uninstalling Mongo:

sudo service mongod stop
sudo apt-get purge mongodb-org*

Then I installed the specific version of Mongo:

apt-get install mongodb-org=3.4.1 mongodb-org-server=3.4.1 mongodb-org-shell=3.4.1 mongodb-org-mongos=3.4.1 mongodb-org-tools=3.4.10

Then I deleted the .lock files:

rm -rf /path/to/mongod.lock
rm -rf /path/to/WiredTiger.lock

Next you have to grant permissions to Mongo again:

sudo systemctl enable mongod

(Make sure the dbpath is correct in /etc/mongod.conf. If you want to make any changes to the mongod.service file, do it now, and remember to run systemctl daemon-reload to set the changes.)

Then finish updating permissions:

sudo chown -R mongodb:mongodb /var/lib/mongodb
sudo chown -R mongodb:mongodb /var/log/mongodb

Now service mongod start or sudo systemctl mongod start should work.

Here are links to some of the resources I found helpful:

robertbabington
  • 189
  • 1
  • 2
  • 10