Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

161
Views
error when downgrading mongodb 3.4 to 2.6.11

I was trying to downgrade my local mongodb version from 3.4 to 2.6.11 in ubuntu 14.04, I'm getting the following error when I'm trying to start mongodb:

2017-01-27T10:24:16.190+0600 [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /var/lib/mongodb created by storage engine 'wiredTiger'. The configured storage engine is 'mmapv1'., terminating

Here is the procedure I've followed

remove existing mongodb version

sudo apt-get --purge remove mongodb-org mongodb-org-*
sudo apt-get --purge autoremove

install 2.6.11 version

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo apt-get install -y --force-yes mongodb-org=2.6.11 mongodb-org-server=2.6.11 mongodb-org-shell=2.6.11 mongodb-org-mongos=2.6.11 mongodb-org-tools=2.6.11

pin version

echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-org-shell hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections

start mongodb

sudo service mongod start

debugging

cat /var/log/mongodb/mongod.log

2017-01-27T10:24:16.190+0600 [initandlisten] exception in initAndListen: 28574 Cannot start server. Detected data files in /var/lib/mongodb created by storage engine 'wiredTiger'. The configured storage engine is 'mmapv1'., terminating

screenshot

enter image description here

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The default storage engine in 3.4 is wiredTiger whereas it's mmapv1 in 2.6. Hence data from of 3.4 is not compatible with 2.6.

If your data is not important, just delete the content of data directory and you'll be fine:

rm -rf /var/lib/mongodb/*

If you need the data, reinstall 3.4, backup the data using mongodump, downgrade to 2.6 and restore the data using mongorestore.

Since 3.4 supports additional data types, you may run into some compatibility issues.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!