意外重启后,mongodb无法链接,stop服务时提示"stop: Unknown instance"
巴扎黑
巴扎黑 2017-04-21 11:17:21
0
3
730

ubuntu系统,早上启动不起来。只好复位键强行重启后,执行

>> sudo service mongodb start
mongodb start/running, process 1059

但是发现无法链接,然后执行

>> sudo service mongodb stop
stop: Unknown instance

搞不懂了,怎么办?

巴扎黑
巴扎黑

reply all(3)
PHPzhong

Try deleting the mongo.lock file in the data folder and restarting

小葫芦

Check if mongdb is indeed running, if so it can be used

sudo mongod --shutdown --dbpath <PATH_TO_DB>
PHPzhong

It should be caused by abnormal shutdown.
linux:
sudo top, check to see if there is a process running mongo. If so, kill it and try starting mongo.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template