Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3915

Installing mongod as a windows service fails if paths have spaces in them

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: 2.0.0
    • Fix Version/s: None
    • Component/s: Admin
    • Labels:
    • Environment:
      Windows 7
    • Operating System:
      ALL

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: