Error starting mongo server

I completely start with mac, I get this error trying to open the server using mongod 10309 Cannot create / open the lock file: /data/db/mongod.lock errno: 13 Exception allowed Is the mongod instance already running ?, terminatin

+3
source share
4 answers

Do you have journalalling enabled? If this is not the case, and your mounod instance crashed, you may need to restore it. In this case you need to do

  • Start mongod using the repair switch: mongod --repair. It will start and then complete the removal of the lock file.
  • start mongod ok again.

, --journal mongod.

+5

, - . , mongod , :

ps auxwww | grep mongod

, mongod. , , ( ). -9 ..

, mongod - , . , , .

+14

sudo mongod, . .

+6

If I remember the way back, you need to sudo mkdir /data: I believe that MongoDB will assume that the base directory that it needs does not exist and will not create it on its own.

0
source

All Articles