Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed MongoDB on a Debian VM using apt-get from the 10gen repository. Some time after the install, I wanted to enable authentication in the configuration file, but when I ran service mongodb restart, it stopped and refused to start again.

I am able to reproduce this reliably: every time I run apt-get purge mongodb-10gen; apt-get install mongodb-10gen the server starts. However. when I run service mongodb start, it says

Starting database: mongodb failed!

There is nothing written to the mongo.log file, or any other log that I could find.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I edited /etc/init.d/mongodb to remove the --background argument from the call to start-stop-daemon and got an error with a stack trace. I can't post the full stack trace (because I can't scroll back in the terminal window to get it), but the last function call before the error was some function that has to do with getting the system language.

I had previously set LANG="en_US.UTF-8" in order to build some ruby gems. I ran unset LANG and now I am able to start MongoDB.

(The interesting thing is that I then set LANG... again and restarted MongoDB and it still worked.)

share|improve this answer

Did it look something like the stack trace here?

https://jira.mongodb.org/browse/SERVER-9273

This might be a case of the Locale settings getting messed up - I have seen a logout/login fix that, or a direct setting of LC_ALL or similar do the same. If you can figure out how to reproduce it reliably, then it would be worth reporting, I suspect this is actually a boost dependency rather than a MongoDB one but still worth knowing the trigger and fix for the problem.

share|improve this answer
    
Mine looked a little different, but it is the same as that one in that the last call before the error has locale in the name, which is what clued me in. You're right that it looks from here like a boost problem. –  Moshe Katz May 23 '13 at 16:45

Your Answer

 
discard

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.