Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-3314

manual windows service creation steps do not work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.3.4
    • Component/s: manual
    • Labels:
      None
    • Environment:
      Windows 2012
    • Last comment by Customer:
      false
    • Actual Time:
      4

      Description

      The instructions for manually creating a Windows service as a workaround to SERVER-13515 do not work on Windows 2012 with the default Windows Power Shell. Even if you take care to quote the double quotes and include spaces in the right places, the sc.exe command will not accept the command. It will just spit out the usage statement instead of telling you what is wrong.

      The documentation tells you to type this:

      sc.exe create MongoDB binPath= "\"C:\Program Files\MongoDB 2.6 Enterprise\bin\mongod.exe\" --service --config=\"C:\Program Files\MongoDB 2.6 Standard\mongod.cfg\"" DisplayName= "MongoDB 2.6 Standard" start= "auto"

      ... but removing all extraneous double quotes by referring to directories with non-space filenames was the only way I could get it to work on Windows 2012:

      sc.exe create MongoDB binPath= "c:\progra~1\mongod~1.6st\bin\mongod.exe --service --config=c:\progra~1\mongod~1.6st\mongod.cfg" DisplayName= "MongoDB 2.6 Standard" start= "auto"

      This bug affects:

      • includes/steps-create-manually-windows-service-for-mongodb.yaml
      • includes/steps-create-manually-windows-service-for-mongodb-enterprise.yaml

      It will likely be a non-issue once 2.6.1 is generally available.

      There is a proposed workaround on stackoverflow that suggests using environment variables in powershell like the following example, but I have not tried it:

      {sc.exe create svnserve binpath= "${env:programfiles(x86)}/subversion/bin/svnserve.exe --service -r C:/svnrepositories/" displayname= "Subversion Server" depend= Tcpip start= auto}

        Attachments

          Activity

            People

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            jake.angerman Jake Angerman
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              7 years, 25 weeks, 1 day ago
              Date of 1st Reply: