[DOCS-3314] manual windows service creation steps do not work Created: 30/Apr/14  Updated: 01/May/14  Resolved: 01/May/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.4

Type: Bug Priority: Minor - P4
Reporter: Jake Angerman Assignee: Sam Kleinman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 2012


Participants:
Days since reply: 9 years, 41 weeks, 6 days ago

 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}



 Comments   
Comment by Sam Kleinman (Inactive) [ 01/May/14 ]

After talking with mark.benvenuto, we've decided to not make this change given the pending release of 2.6.1 on Monday and the ultimate correctness of the current solution.

Generated at Thu Feb 08 07:45:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.