Search code examples
mongodbupstartubuntu-14.04

Mongo 2.6.3 does not start on init


On fresh install of Ubuntu 14.04, I have installed mongodb 2.6.3 from mongo package, problem is, that it does not start on reboot. It starts normally when I do

sudo service mongod start

and there are no errors in log file. but when I reboot, log file has no new entries and

service mongod status 

produces

mongod stop/waiting

I have tried mongod --repair, with no effect. I have tried fresh install of Ubuntu 14.04, as I thought that my older many times upgraded OS might have something wrong with it, but nothing changed.

With older version mongo that comes from ubuntu package manager, everything was starting up nicely.

Can you please give some advice on where to look to fix this issue and make mongod start up when system is booted up. Thanks!


Solution

  • Had the same problem. In the log file there was an:

    ************
    Unclean shutdown detected
    Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
    ************
    

    To solve this error, I just removed the lock file and it worked again.

    sudo rm /var/lib/mongodb/mongod.lock