Faulty command line is produced when installing as a service on Windows and using equal sign in options

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.3.2
    • Affects Version/s: 2.0.8, 2.2.2, 2.3.1
    • Component/s: None
    • None
    • Environment:
      Windows 2008
    • Windows
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When you try to install mongod as a service on Windows specifying any of the --serviceName, --serviceDisplayName or --serviceDescription options using an equal sign to separate the option name from the option value, the command line produced for the service may be missing options and/or have leftover text and the service may not be able to be successfully started.

      Steps to reproduce

      1. Try to install mongod as a service with as below:
      C:\Mongo\bin>mongod --install --serviceName="My Service" --serviceDescription "My Service" --serviceDisplayName "My Service" --dbpath C:\mongo\data\config --port 20001 --logpath C:\mongo\logs\mongo_config.log.txt --configsvr

      2. Issue the following command
      net start "My Service"

      3. Verify that the following error is reported:
      The service is not responding to the control function

      4. WORKAROUND
      a. Go to the registry for this service (HKLM\SYSTEM\CurrentControlSet\services)
      b. Verify that in the ImagePath after --service there's a spurious "My Service" string (without quotes)
      c. remove that string and save
      d. verify that the service is now starting properly.

            Assignee:
            Andy Schwerin
            Reporter:
            Stefano Ricciardi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: