MongoDB not running properly



I had installed MonogDB for my workspace which also worked, but now when I run ./mongod it gives me an error

Unclean shutdown detected.
Please visit for recovery instructions.

After following the instruction, i found that mongod.lock* is not empty. I tried to restart the workspace and also repair mongoDB using

mongod --dbpath /data/db --repair

but with no results, i am completely stuck now, any help will be appreciated,


I have the exact same issue. I tried all those things and nothing worked.

If you figure it out please explain how :slight_smile:


I fixed the error. You must delete /data/db/mongod.lock and then run

mongod --repair

on your database.

This solved the issue for me. Hope it will help you too


You guys need to do this:

:~ ls data/ lib/ mongod* workspace/ :~ cd data
:~/data ls _tmp/ cat_app.0 cat_app.ns demo.0 demo.ns local/ local.0 local.ns mongod.lock* :~/data rm mongod.lock
ryannadel:~/data cd .. ryannadel:~ ./mongod


Thanks rynad!
The objective is deleting the mogo.lock file in the /data directory. After which you can restart


Step 1.~ cd data Step 2. ~ ls
Step 3. ~ rm mongo.lock Step 4. ~ ./mongod


Thanks for the @all for the leads.
In my case I had to include a path to mongod before the repair command could work properly:
./mongod --repair
after which my database connect could then start with:


This one worked for me…


my /data directory is empty but i am getting the error unclean shutdown please any one help me.