MongoDB not running properly

mongodb

#1

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 http://dochub.mongodb.org/core/repair 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,


#2

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

If you figure it out please explain how :slight_smile:


#3

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


#4

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


#5

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

SOLUTION:

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


#6

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:
./mongod


#7

This one worked for me…


#8

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