Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My MongoDB server died. The log says something about an unclean shutdown and an existing mongodb.lock file. It recommends to remove the lock file, then restart the mongodb server with --repair.

However, on my system (Ubuntu 10.10), I've installed MongoDB via an apt-get package, and it's set up as Upstart job. If I run mongodb from the command line, it won't find the data, none of the paths are set correctly. Surely, I could read the man page, try to emulate what Upstart would do, give it all the correct parameters plus --repair but that seems like a lot of trouble. There must be a simpler way, that's not fighting Upstart. What is it?

share|improve this question
up vote 3 down vote accepted

Quick Workaround: Start mongodb and then immediately afterward run ps -aux | grep mongodb. The goal here is to get all the parameters that mongodb is started with. Once you find them you can copy and paste it into your shell and add whatever arguments you need.

Long Way: 2 options: See if you can set it in /etc/mongodb.conf which theoretically has all the arguments there or see if there is an upstart configuration file in one of the defaults folders

share|improve this answer
Ah, I like the first one. Hadn't considered that. Thanks. – Wolfram Arnold Apr 2 '12 at 20:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.