Failed to start mongod.service: Unit mongod.service not found

前端 未结 25 1488
误落风尘
误落风尘 2020-12-07 14:43

I follow all the steps mention in MongoDB installation documents for Ubuntu 16.04.

Steps 1:

sudo apt-key adv --keyserv         


        
相关标签:
25条回答
  • 2020-12-07 15:21

    This happened to me while adding users in admin db.

    sudo systemctl daemon-reload 
    

    is recommended from the official mongo website, but did not help.

    If you get

    Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details.

    While executing

    sudo systemctl start mongod
    

    run journalctl -xe and if the issue is

    Failed to start MongoDB Database Server.
    -- Subject: Unit mongod.service has failed
    

    Then run sudo mongod --> mongo This will fix the issue and if you want to run with systemctl, then terminate the windows for mongod and mongo and run

    sudo systemctl start mongod 
    

    and then mongo

    0 讨论(0)
提交回复
热议问题