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

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.0
    • Component/s: Admin
    • Environment:
      Windows 7
    • ALL

      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.

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

              Created:
              Updated:
              Resolved: