Error: The service is not responding to the control function when starting MongoDB windows service
I started following a tutorial on a blog that required MongoDB [I am using 2.6 version]. It had instructions on downloading and configuring the service. But for some reason the command for starting the Windows service in that tutorial wasn’t working. So I went to the MongoDB docs and tried running this command as listed in the article:
sc.exe create MongoDB binPath= "\"C:\Program Files\MongoDB 2.6 Standard\bin\mongod.exe\" --service --config=\"C:\Program Files\MongoDB 2.6 Standard\mongod.cfg\"" DisplayName= "MongoDB 2.6 Standard" start= "auto"
I got this message: [SC] CreateService SUCCESS
Then I ran this one:
net start MongoDB
And got this message:
The service is not responding to the control function.
More help is available by typing NET HELPMSG 2186.
After some trials and errors, I noticed when following the tutorial it asked me to name my file mongod.conf but the command was trying to refer to mongod.cfg.
As soon as I corrected that name and re-ran the commands, the service started running fine.
Hope this helps.