zcl_ccc 发表于 2018-10-28 09:57:13

mongoDB启动失败问题解决

  system :centOS 5.5
View Log:# tail -20 /usr/local/mongo/mongodb.log  Mon Sep 19 06:14:55 MongoDB starting : pid=4126 port=27017 dbpath=/usr/local/mongo/data 64-bit
Mon Sep 19 06:14:55 db version v1.8.1, pdfile version 4.5Mon Sep 19 06:14:55 git version: nogitversionMon Sep 19 06:14:55 build sys info: Linux localhost.localdomain 2.6.18-238.19.1.el5 #1 SMP Fri Jul 15 07:31:24 EDT 2011 x86_64BOOST_LIB_VERSION=1_33_1************** old lock file: /usr/local/mongo/data/mongod.lock.probably means unclean shutdownrecommend removing file and running --repairsee: http://dochub.mongodb.org/core/repair for more information*************Mon Sep 19 06:14:55 exception in initAndListen std::exception: old lock file, terminatingMon Sep 19 06:14:55 dbexit: Mon Sep 19 06:14:55 shutdown: going to close listening sockets...Mon Sep 19 06:14:55 shutdown: going to flush diaglog...Mon Sep 19 06:14:55 shutdown: going to close sockets...Mon Sep 19 06:14:55 shutdown: waiting for fs preallocator...Mon Sep 19 06:14:55 shutdown: closing all files...Mon Sep 19 06:14:55 closeAllFiles() finishedMon 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. #rm -rf /usr/local/mongo/data/mongod.lock
页: [1]
查看完整版本: mongoDB启动失败问题解决