I am trying to use the Windows Service feature in a step and get the error "sc.exe create failed with exit code: 1639"
The tentacle is running on a “Windows Server 2012 R2 Datacenter, October 2014” box in Azure
I have previously run this same deployment on a “Windows Server 2012 Datacenter, October 2014” box successfully (notice the lack of R2)
How do I fix?
Here is the log information:
The Atomic.ManagedDns.Server service does not exist. It will be created.
sc.exe create "Atomic.ManagedDns.Server" binPath= "\"C:\Applications\Infrastructure\Atomic.ManagedDns.Server\126.96.36.199_1\Atomic.ManagedDns.Server.exe\" -c c:\ManageDnsConfig\config.json" DisplayName= "Atomic.ManagedDns.Server" depend= "" start= "auto"
Creates a service entry in the registry and Service Database.
sc <server> create [service name] [binPath= ] <option1> <option2>...
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
(default = own)
(default = demand)
(default = normal)
binPath= <BinaryPathName to the .exe file>
depend= <Dependencies(separated by / (forward slash))>
(default = LocalSystem)
DisplayName= <display name>
sc.exe create failed with exit code: 1639
At C:\Program Files\Octopus Deploy\Tentacle\Scripts\Octopus.Features.WindowsSer
+ throw "sc.exe create failed with exit code: $LastExitCode"
+ CategoryInfo : OperationStopped: (sc.exe create f...exit code:
1639:String) , RuntimeException
+ FullyQualifiedErrorId : sc.exe create failed with exit code: 1639
PowerShell script returned a non-zero exit code: 1
Tentacle version 188.8.131.526
I am unable to get that workaround to work. I have updated Octopus.Features.WindowsService_BeforePostDeploy.ps1 on lines 91, 105 & 115 (not in instructions, but likely needs to be changed as well).
I restarted the tentacles in case they were caching the scripts. Still didn’t work.
The sc.exe issue was fixed in the latest version. 184.108.40.2068
Your Octopus UI shows the Octopus version at the very bottom of the screen.
And also majority of the logs show it for tentacle such as: PowerShell script returned a non-zero exit code: 1 Tentacle version 220.127.116.111