mongodb service is not starting up

前端 未结 21 684
野的像风
野的像风 2020-12-02 05:16

I\'ve installed the mongodb 2.0.3, using the mongodb-10gen debian package. Everything went well, except the service which is installed by default is not starting up when com

21条回答
  •  醉梦人生
    2020-12-02 05:25

    Removing the .lock file and reinstalling did not solve the issue on my machine (Ubuntu 19.10). The problem was that after unexpected shutdown, the MongoDB sock does not belong to the MongoDB group and user anymore.

    So, I follow the steps below:

    1. cd /tmp
    2. ls *.sock
    3. Change the user:group permission:

      chown mongodb:mongodb 
      
    4. sudo systemctl start mongod

    5. sudo systemctl status mongod

提交回复
热议问题