After installing MongoDB as a windows service I wasn’t able to get it started. Instead the following error message was shown:
The Mongo DB service is starting.
The Mongo DB service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
When MongoDB crashes like this, you have to do some clean up work before trying to start it again:
- Delete the following file inside the
/data/db/
directory:mongod.lock
mongod.exe –repair
- Start the mongod service again