I installed mongodb following this tutorial here, no errors during the installation but when I try to start the mongod server using this command sudo systemctl start m
This error returned by MongoDB applications which encounter an unrecoverable error, an uncaught exception or uncaught signal. The system exits without performing a clean shutdown.
I solved the problem by the command:
sudo chown -R mongodb:mongodb /var/log/mongodb
sudo chown -R mongodb:mongodb /var/lib/mongodb
sudo chmod -R 755 /var/lib/mongodb
sudo chmod -R 755 /var/log/mongodb
sudo chown mongodb /tmp/mongodb-27017.sock
sudo chgrp mongodb /tmp/mongodb-27017.sock
Then restart service
sudo systemctl restart mongod
Then check your mongodb service
sudo systemctl status mongod