Open philipdouglas opened 7 years ago
we are facing similar issue when installing two different jenkins with different service names. we modified jenikins.xml withe new service name but still showing Service with id 'jenkins-slave' already exists To install the service, delete the existing one or change service Id in the configuration file STDERR: System.Exception: Installation failure: Service with id 'jenkins-slave' already exists at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor) at winsw.WrapperService.Main(String[] args)
Cookbook version
4.1.2
Chef-client version
12.9.41
Platform Details
Windows 7 I have been unable to reproduce it on Windows Server 2012 R2 or Windows 10
Scenario:
The service config xml file is updated and the service is automatically uninstalled and recreated with the new settings.
Steps to Reproduce:
Expected Result:
The client should spot the config file has changed, correct it and then reinstall the service to pick up any new settings.
Actual Result:
Chef spots the change and updates the file. This triggers the reinstall, which appears to stop and uninstall the service, but then fails to install it because it already exists. By the time the run ends, the service is gone.
I was able to fix the problem by replacing
jenkins-slave.exe stop
withnet stop jenkins-slave
in the batch resource.The console output: