快上网专注成都网站设计 成都网站制作 成都网站建设
成都网站建设公司服务热线:028-86922220

网站建设知识

十年网站开发经验 + 多家企业客户 + 靠谱的建站团队

量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决

mongoDB启动失败问题解决

system :centOS 5.5 

创新互联-专业网站定制、快速模板网站建设、高性价比海陵网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式海陵网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖海陵地区。费用合理售后完善,10余年实体公司更值得信赖。

View Log:
[root@localhost mongo]# tail -20 /usr/local/mongo/MongoDB.log

Mon Sep 19 06:14:55 [initandlisten] MongoDB starting : pid=4126 port=27017 dbpath=/usr/local/mongo/data 64-bit 

Mon Sep 19 06:14:55 [initandlisten] db version v1.8.1, pdfile version 4.5
Mon Sep 19 06:14:55 [initandlisten] git version: nogitversion
Mon Sep 19 06:14:55 [initandlisten] build sys info: Linux localhost.localdomain 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64 
 
BOOST_LIB_VERSION=1_33_1
************** 
old lock file: /usr/local/mongo/data/mongod.lock.  probably means unclean shutdown
recommend removing file and running --repair
see: http://dochub.mongodb.org/core/repair for more information
*************
Mon Sep 19 06:14:55 [initandlisten] exception in initAndListen std::exception: old lock file, terminating
Mon Sep 19 06:14:55 dbexit: 
Mon Sep 19 06:14:55 [initandlisten] shutdown: going to close listening sockets...
Mon Sep 19 06:14:55 [initandlisten] shutdown: going to flush diaglog...
Mon Sep 19 06:14:55 [initandlisten] shutdown: going to close sockets...
Mon Sep 19 06:14:55 [initandlisten] shutdown: waiting for fs preallocator...
Mon Sep 19 06:14:55 [initandlisten] shutdown: closing all files...
Mon Sep 19 06:14:55 closeAllFiles() finished
Mon Sep 19 06:14:55 dbexit: really exiting now
 
Analysis:If a server running MongoDB crashed or MongoDB did not get to shut down cleanly for some other reason, you may not be able to start Mongo again, getting "exception in initAndListen std::exception: old lock file, terminating" error in Mongo error log.
 
Fix is actually pretty easy, you just need to locate mongod.lock file and remove it.
 
[root@localhost mongo]#rm -rf /usr/local/mongo/data/mongod.lock

网站标题:mongoDB启动失败问题解决
本文网址:http://6mz.cn/article/pigspg.html

其他资讯