Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

163
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda