- From: Dan-Joe Lopez <
>
- To: "
" <
>
- Subject: [chef] Re: Service resource on windows returning error: An instance of the service is already running.
- Date: Tue, 7 Jul 2015 22:18:33 +0000
- Accept-language: en-US
- Authentication-results: lists.opscode.com; dkim=none (message not signed) header.d=none;
Here is the stacktrace:
Generated at 2015-07-07 21:42:39 +0000
SystemCallError: service[Apache2.2] (GA-apache-config::default line 26) had an error: SystemCallError: An instance of the service is already running. - StartService: An instance of the service is already running.
c:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/win32-service-0.8.2/lib/win32/windows/helper.rb:36:in `raise_windows_error'
c:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/win32-service-0.8.2/lib/win32/service.rb:723:in `start'
c:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.6-x86-mingw32/lib/chef/provider/service/windows.rb:74:in `block in start_service'
c:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.6-x86-mingw32/lib/chef/provider/service/windows.rb:187:in `block in spawn_command_thread'
c:/opscode/chef/embedded/lib/ruby/1.9.1/win32ole.rb:13:in `call'
c:/opscode/chef/embedded/lib/ruby/1.9.1/win32ole.rb:13:in `block in initialize'
This occurred on Windows Server 2012 R2 Standard
Sent from Windows Mail
Hello Chefs,
I feel as though I am mistaking something here. The basic idea of chef resources, as explained to me, is that they describe the desired state of a system. To that end, when I call:
service “My_Service” do
action tart
end
My expectation is that it will:
Start the service if My_Service is stopped
Bail out with an error if My_Service doesn’t exist, or is in an “un-startable” state
Do *nothing* if My_Service is already started, as the service is already in the desired state
Unfortunately on the latter, it is throwing an error, that an instance of the service is already running.
Is this a limitation/bug in the way that chef for windows processes services, or a bug in my expectations of the functionality?
Many thanks in advance!
Dan-Joe Lopez
Sent from Windows Mail
|
Archive powered by MHonArc 2.6.16.