MongoDB startup failure solved

Source: Internet
Author: User
System: CentOS5.5ViewLog: [root @ localhostmongo] # tail-20usrlocalmongomongodb.logMonSep1906: 14: 55 [initand

System: CentOS 5.5 View Log: [root @ localhost mongo] # tail-20/usr/local/mongo/mongodb. log Mon Sep 19 06:14:55 [initand

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] 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 = 255.33_1
**************
Old lock file:/usr/local/mongo/data/mongod. lock. probably means unclean shutdown
Recommend removing file and running -- repair
See: 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 your D. lock file and remove it.

[Root @ localhost mongo] # rm-rf/usr/local/mongo/data/mongod. lock

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.