今天在启动mongodb的时候,发现起不来,报错:child process failed, exited with error number 100然后先去/var/log/mongo/mongod.log 查看启动的日志,发现:
<ignore_js_op>http://dochub.mongodb.org/core/repair for recovery instructions.
*************
Sat Apr 20 09:40:31.286 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
看来应该是没有正常关闭mongodb引起的。根据提示的链接去看了下,要以修复的方式启动。
<ignore_js_op>http://docs.mongodb.org/manual/tutorial/manage-mongodb-processes/
先通过shell连上服务器:
mongo
use admin
db.shutdownServer()
或者直接kill -15 <pid>,注意kill -9 可能会导致数据文件损坏
转载来源:http://www.dataguru.cn/thread-107361-1-1.html