MongoDB Service Will Not Start After Initial Setup

前端 未结 11 1748
夕颜
夕颜 2021-01-31 12:11

I am running Fedora 20 and installed MongoDB per the Red Hat installation guide on the official documentation. I was able to run the mongod daemon as a service with

11条回答
  •  孤街浪徒
    2021-01-31 12:20

    I have the same problem, I solved it temporarily, disabling SELinux, rebooted the machine, eliminated mongod.lock:

    #rm /var/lib/mongo/mongod.lock
    

    By creating the file /var/run/mongodb/mongo.pid (as mentioned in the configuration file /etc/mongod.conf):

    #mkdir /var/run/mongodb
    #touch /var/run/mongodb/mongod.pid
    

    and giving 777 permissions:

    #chmod 777 /var/run/mongodb/mongod.pid 
    

    and starting mongo:

    #service mongod start
    

    But the problem persists after restarting the machine. The folder and file disappear.

提交回复
热议问题