1
1

mongodb is not starting up properly ubuntu

On occasion mongoDB doesn't start.

When I attempt to start service manually ...

$ sudo service mongodb start
mongodb start/running, process 10243

It appears to start but still doesn't ...

$ sudo service mongodb status
mongodb stop/waiting

Why is this happening?

EDIT mongodb.log

Thu Sep 15 20:01:22 MongoDB starting : pid=10559 port=27017 dbpath=/var/lib/mongodb 64-bit 
Thu Sep 15 20:01:22 db version v1.6.3, pdfile version 4.5
Thu Sep 15 20:01:22 git version: nogitversion
Thu Sep 15 20:01:22 sys info: Linux allspice 2.6.24-28-server #1 SMP Wed Aug 18 21:17:51 UTC 2010 x86_64 BOOST_LIB_VERSION=1_42
************** 
old lock file: /var/lib/mongodb/mongod.lock.  probably means unclean shutdown
recommend removing file and running --repair
see: http://dochub.mongodb.org/core/repair for more information
*************
Thu Sep 15 20:01:22 exception in initAndListen std::exception: old lock file, terminating
Thu Sep 15 20:01:22 dbexit:

Thu Sep 15 20:01:22 shutdown: going to close listening sockets...
Thu Sep 15 20:01:22 shutdown: going to flush oplog...
Thu Sep 15 20:01:22 shutdown: going to close sockets...
Thu Sep 15 20:01:22 shutdown: waiting for fs preallocator...
Thu Sep 15 20:01:22 shutdown: closing all files...
Thu Sep 15 20:01:22     closeAllFiles() finished

Thu Sep 15 20:01:22 dbexit: really exiting now

asked 15 Sep '11, 19:54

fox's gravatar image

fox ♦♦
800162527
accept rate: 37%

edited 15 Sep '11, 20:02

Russell%20Ballestrini's gravatar image

Russell Ball...
1.3k232937


Did you check the mongoDB logs?

tail and follow the mongoDB log when attempting to start the service.

tail -f /var/log/mongodb/mongodb.log

Delete the old .lock file!!!

sudo rm -rf /var/lib/mongodb/mongod.lock
link

answered 15 Sep '11, 19:59

Russell%20Ballestrini's gravatar image

Russell Ball...
1.3k232937
accept rate: 43%

edited 15 Sep '11, 20:04

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5
×1
×1
×1
×1

Asked: 15 Sep '11, 19:54

Seen: 3,459 times

Last updated: 15 Sep '11, 20:04

powered by OSQA