Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Problem resolution of mongoDB startup failure

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

System: centOS 5.5

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] gitversion: 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 million 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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report