While setting up MongoDB for windows using the MSI Installer, I ran into an interesting error on attempt to start the MongoDB Server Windows Service.
To troubleshoot the problem, I went to the service entry in Services.msc and reviewed the startup parameters for the mongod.exe executable.
Looking at the Path to Executable section, I was able to copy the command used to start the service.
“C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe” –config “C:\Program Files\MongoDB\Server\4.2\bin\mongod.cfg” –service
Running this in a Windows command prompt shell gave me a good enough hint to continue my troubleshooting:
Since mongod.exe is reading its startup parameters from mongod.cfg, this “unrecognized” option must be somewhere in that configuration file.
And naturally enough, we found the culprit! There was an option “mp” at the end of the config file. So, I went ahead and commented out by adding a leading hash (#).
Problem Solved!