Stop: Unknown instance mongodb (Ubuntu)

前端 未结 5 2182
慢半拍i
慢半拍i 2020-12-14 16:06

I am new to Mongodb. When I run the following command:

sudo service mongodb start

It shows me \"mongodb start/running, process 3566

5条回答
  •  悲&欢浪女
    2020-12-14 16:48

    The reason you get the Unknown instance error is because upstart is tracking the wrong PID for the instance of forked mongod process. But the proper solution to this is not running the process in foreground by removing fork=true line from the config like @GoingTharn suggesting, but rather helping upstart to capture the right PID of the forked process by adding

    expect daemon
    

    to the /etc/init/mongodb.conf

提交回复
热议问题