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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • 2.0.0
    • None
    • Admin
    • Windows 7
    • 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

              tad Tad Marshall
              robert@mongodb.com Robert Stam
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: