Can not start MongoDB windows service on Windows 7

130 views Asked by At

I have installed MongoDB 3.0.3 as a windows service on Windows 7 using below command

mongod --dbpath "E:\MongoDB\Data\db" --logpath "E:\MongoDB\Data\log\mongodb.log" --install --serviceName "MongoDB.3.0.3" --serviceDisplayName "MongoDB 3.0.3"

I can see the entry in services.msc. But when I start the service i get below error

enter image description here

I tried reinstalling it and even restarting the PC but nothing worked.

1

There are 1 answers

0
Pradeep On

I got the solution.

The reason for this error was unclear shutdown of service(my PC got restarted abruptly dues to some windows update last day). this corrupts the database files. So I deleted all the files from "E:\MongoDB\Data\db" folder and it worked.