Stop: Unknown instance mongodb (Ubuntu)

前端 未结 5 2144
慢半拍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:47

    I faced exactly the same problem and did the followings:

    • Removed the file mongod.lock (in my case this file was located at /var/lib/mongodb/)
    • Used the following command from my mongo client

    mongo --repair

    And that fixed the issue. It may be noted that I had a system crash prior to this problem appeared. Therefore, what I believe, the problem was caused due to the unclean shutdown of the server demon.

    If you are unsure of the reason, you may wish to have a look at the log file (in my case I found it under /var/log/mongodb/). That might give you some useful hints.

    Thanks.

提交回复
热议问题