Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mongodb error: how do I make sure that your journal directory is mounted

Tags:

mongodb

I typed mongod on in my mac terminal and got the following error:

2015-04-27T22:11:46.471-0400 W -        [initandlisten] Detected unclean  shutdown - /data/db/mongod.lock is not empty.
2015-04-27T22:11:46.479-0400 I STORAGE  [initandlisten] ************** 
old lock file: /data/db/mongod.lock.  probably means unclean shutdown,
but there are no journal files to recover.
this is likely human error or filesystem corruption.
please make sure that your journal directory is mounted.
found 4 dbs.
see: http://dochub.mongodb.org/core/repair for more information

How do I make sure my journal directory is mounted? Will that solve the problem?

like image 947
DBWeinstein Avatar asked Apr 28 '15 02:04

DBWeinstein


Video Answer


2 Answers

You have an unclean shutdown. You should start mongod with --repair option.

mongod --repair

Note that after repair you will need to restart mongod

like image 109
styvane Avatar answered Nov 16 '22 01:11

styvane


1.delete mongo.lock

2.Mongod --dbpath path --repair

3.mongod --dbpath path

Run command with Admin accesss.I had sloved in Windows machine.

like image 27
Vishe Avatar answered Nov 16 '22 02:11

Vishe