After setting up MongoDB service on Windows Server 2008 R2 this error was raised.
C:\\mongodb\\bin>net start MongoDB
The Mongo DB service is starting.
The Mo
Make sure you have at least 5 Gb available space on the drive of the database. For me, clearing that space enabled the ability to restart Mongodb.
Although, not an ideal solution, I ended up deleting all of the database files in \data\db
and was then able to successfully run the MongoDB
service. Note, this will delete all of the data in the database.
If you are in the Windows. you should change the mongodb's config in the System disk.For example
1) I change C:\Windows\system32\mongodb.exe
.
2) And I make the path in D:\mongodb\mongod.cfg
.Before this,you should remove previous.
3) Finally , you can net the serve. net start mongodb
.
I hope it can help you .English is not very good ,please forgive me. enter image description here
For anyone who faced this error on 2020, with version 4.4.1 of mongo, and the accepted answer not solve the issue, here is what I've done:
And it should work.
UPDATE for January 2021, the following saved me without re-installing MongoDB and losing all my data:
C:\Program Files\MongoDB\Server\4.4\bin>mongod --dbpath "C:\Program Files\MongoDB\Server\4.4\data" --repair
I was facing the same issue and I closed the other command prompt which was opened with mongoDB.exe, and hence created a lock on that executable. Simply only closing that command prompt window worked fine. Thanks for the help.
I was having the problem of starting the the MongoDB. The logs are pretty descriptive and you can find suggestion from there.
There is a 'd' folder that needs to be created within data folder like data\d which was missing.
This solved my problem.