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\1.0.0.17_1\Atomic.ManagedDns.Server.exe\" -c c:\ManageDnsConfig\config.json" DisplayName= "Atomic.ManagedDns.Server" depend= "" start= "auto"
DESCRIPTION:
Creates a service entry in the registry and Service Database.
USAGE:
sc <server> create [service name] [binPath= ] <option1> <option2>...
OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
type= <own|share|interact|kernel|filesys|rec>
(default = own)
start= <boot|system|auto|demand|disabled|delayed-auto>
(default = demand)
error= <normal|severe|critical|ignore>
(default = normal)
binPath= <BinaryPathName to the .exe file>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
(default = LocalSystem)
DisplayName= <display name>
password= <password>
Error 16:06:22
sc.exe create failed with exit code: 1639
Error 16:06:22
At C:\Program Files\Octopus Deploy\Tentacle\Scripts\Octopus.Features.WindowsSer
Error 16:06:22
vice_BeforePostDeploy.ps1:94 char:3
Error 16:06:22
+ throw "sc.exe create failed with exit code: $LastExitCode"
Error 16:06:22
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error 16:06:22
+ CategoryInfo : OperationStopped: (sc.exe create f...exit code:
Error 16:06:22
1639:String) [], RuntimeException
Error 16:06:22
+ FullyQualifiedErrorId : sc.exe create failed with exit code: 1639
Fatal 16:06:22
PowerShell script returned a non-zero exit code: 1
Tentacle version 2.5.12.666
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.
Can you send through the full deployment log of the failed deployment, if it has sensitive information in it, please raise a new support ticket and mark it as private.
Where can I find it? Or do I just copy it from the portal?
- David
On 26 Nov 2014 23:48, Henrik Andersson
<tender2+ddd6f0aca37ea294de139115cb5df1205ec284f74@tenderapp.com>
wrote:
// Please reply above this line
==================================================
From: Henrik Andersson (Support staff)
David,
Can you send through the full deployment log of the failed
deployment, if it has sensitive information in it, please raise a
new support ticket and mark it as private.
Thank you and kind regards,
Henrik Andersson
On Wed, Nov 26 at 02:29 PM, david.desloovere wrote:
It's a Windows Server 2008 R2 Enterprise with SP1.
The sc.exe issue was fixed in the latest version. 2.6.0.778
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 2.6.0.751