Answer the question
In order to leave comments, you need to log in
Why won't mongodb start?
The situation is this: everything worked and suddenly fell off.
I tried to start mongodb manually through the command mongod
- I got this error:
exception in initAndListen: 29 Data directory /data/db not found., terminating
chown -R mongodb /data/db
mongod
database began to start, but it was empty. It doesn't care - there is operational data that becomes obsolete in half an hour. systemctl start mongod
- throws an error:Failed to start mongod.service: Unit mongod.service not found.
systemctl unmask mongodb
systemctl start mongodb
- now it gives another error:Process: 7409 ExecStart=/etc/init.d/mongodb start (code=exited, status=1/FAILURE)
systemd[1]: Failed to start LSB: An object/document-oriented database.
Answer the question
In order to leave comments, you need to log in
In short, I still have old packages from another version of mongodb there, that's why all the problems. The following helped:
apt remove mongodb-org
apt purge mongodb-org
apt remove mongodb
apt purge mongodb
apt autoremove
apt install mongodb-org
systemctl start mongod
systemctl enable mongod
everything worked and suddenly fell off
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question