If mongod is installed as a Windows service and any command line parameters contain spaces it fails to start. For example:
C:>mongod --install --config "c:\test\mongo data\mongod.conf"
The install works, but the service can't be started. It looks like the quotes needed around the path containing a space are lost when the service is installed. The ImagePath entry in the Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MongoDB node contains:
"C:\mongodb\mongodb-win32-x86_64-2.0.0\bin\mongod" --config c:\test\mongo data\mongod.conf --service
Where you can see that the --config value is no longer quoted.
Easy workaround: don't use spaces in any paths.
- duplicates
-
SERVER-4410 Windows Service --install option isn't quoting all file parameters
- Closed