Mongodb not working on Ubuntu 16.04

前端 未结 11 929
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-28 15:51

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

11条回答
  •  感情败类
    2020-12-28 16:28

    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
    

提交回复
热议问题