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

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.3.2
    • 2.0.8, 2.2.2, 2.3.1
    • None
    • None
    • Windows 2008
    • Windows

    Description

      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.

      Attachments

        Activity

          People

            schwerin@mongodb.com Andy Schwerin
            stefanoric Stefano Ricciardi
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: