Error executing action `start` on resource 'service[sensu-client]'


#1

Did you configure the Sensu client, using the “sensu_client” resource? You must use a wrapper cookbook, like the example portertech/chef-monitor.

···

On Oct 1, 2014 4:37 AM, “kinpo Samohan” gashanischeating@gmail.com wrote:

my environment is CentOS release 6.5 (Final)

Recipe: sensu::client_service

  • sensu_service[sensu-client] action enable
  • service[sensu-client] action enable (up to date)

(up to date)

  • sensu_service[sensu-client] action start
  • service[sensu-client] action start

================================================================================

Error executing action start on resource ‘service[sensu-client]’

================================================================================

Mixlib::ShellOut::ShellCommandFailed


Expected process to exit with [0], but received ‘1’

---- Begin output of /sbin/service sensu-client start ----

[FAILED]DOUT: Starting sensu-client[FAILED]

STDERR:

---- End output of /sbin/service sensu-client start ----

Ran /sbin/service sensu-client start returned 1

Cookbook Trace:


/var/chef/cookbooks/sensu/providers/service.rb:127:in `block in class_from_file’

Resource Declaration:


In /var/chef/cookbooks/sensu/providers/service.rb

46: service new_resource.service do

47: provider service_provider

48: supports :status => true, :restart => true

49: retries 3

50: retry_delay 5

51: action :nothing

52: subscribes :restart, resources(“ruby_block[sensu_service_trigger]”), :delayed

53: end

54: when “runit”

Compiled Resource:


Declared in /var/chef/cookbooks/sensu/providers/service.rb:46:in `load_current_resource’

service(“sensu-client”) do

provider Chef::Provider::Service::Redhat

action [:nothing]

supports {:status=>true, :restart=>true}

retries 0

retry_delay 5

guard_interpreter :default

service_name “sensu-client”

enabled true

pattern “sensu-client”

cookbook_name :sensu

end

================================================================================

Error executing action start on resource ‘sensu_service[sensu-client]’

================================================================================

Mixlib::ShellOut::ShellCommandFailed


service[sensu-client] (/var/chef/cookbooks/sensu/providers/service.rb line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

---- Begin output of /sbin/service sensu-client start ----

[FAILED]UT: Starting sensu-client[FAILED]

STDERR:

---- End output of /sbin/service sensu-client start ----

Ran /sbin/service sensu-client start returned 1

Cookbook Trace:


/var/chef/cookbooks/sensu/providers/service.rb:127:in `block in class_from_file’

Resource Declaration:


In /var/chef/cookbooks/sensu/recipes/client_service.rb

20: sensu_service “sensu-client” do

21: init_style node.sensu.init_style

22: action [:enable, :start]

23: end

Compiled Resource:


Declared in /var/chef/cookbooks/sensu/recipes/client_service.rb:20:in `from_file’

sensu_service(“sensu-client”) do

action [:enable, :start]

retries 0

retry_delay 2

guard_interpreter :default

cookbook_name :sensu

recipe_name “client_service”

init_style “sysv”

service “sensu-client”

end

Running handlers:

[2014-10-01T11:32:37+00:00] ERROR: Running exception handlers

Running handlers complete

[2014-10-01T11:32:37+00:00] ERROR: Exception handlers complete

[2014-10-01T11:32:37+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out

Chef Client failed. 2 resources updated in 30.131740663 seconds

[2014-10-01T11:32:37+00:00] ERROR: sensu_service[sensu-client] (sensu::client_service line 20) had an error: Mixlib::ShellOut::ShellCommandFailed: service[sensu-client] (/var/chef/cookbooks/sensu/providers/service.rb line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

---- Begin output of /sbin/service sensu-client start ----

[FAILED]Starting sensu-client[FAILED]

STDERR:

---- End output of /sbin/service sensu-client start ----

Ran /sbin/service sensu-client start returned 1

[2014-10-01T11:32:37+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

``

is any idea?


#2

Thenk you portertech.
I set like this

Cheffile

site “http://community.opscode.com/api/v1

cookbook “sensu”, path: “.”

···

cookbook “sensu-test”, path: “test/cookbooks/sensu-test”


cookbook “monitor”, :git => "https://github.com/portertech/chef-monitor.git",ref:"e2c47648fbb7ac1709ad3dc0d61601ef306c521b"

and then, I want to add run_list but my run_list is

{

“run_list”: [

“sensu::default”,

“sensu::redis”,

“sensu::rabbitmq”,

“sensu::server_service”,

“sensu::client_service”,

“sensu::api_service”

]

}

How can I set “recipe[monitor::redis]” in run_list?


On Thursday, October 2, 2014 2:46:11 AM UTC+9, portertech wrote:

Did you configure the Sensu client, using the “sensu_client” resource? You must use a wrapper cookbook, like the example portertech/chef-monitor.

On Oct 1, 2014 4:37 AM, “kinpo Samohan” gashanis...@gmail.com wrote:

my environment is CentOS release 6.5 (Final)

Recipe: sensu::client_service

  • sensu_service[sensu-client] action enable
  • service[sensu-client] action enable (up to date)

(up to date)

  • sensu_service[sensu-client] action start
  • service[sensu-client] action start

================================================================================

Error executing action start on resource ‘service[sensu-client]’

================================================================================

Mixlib::ShellOut::ShellCommandFailed


Expected process to exit with [0], but received ‘1’

---- Begin output of /sbin/service sensu-client start ----

[FAILED]DOUT: Starting sensu-client[FAILED]

STDERR:

---- End output of /sbin/service sensu-client start ----

Ran /sbin/service sensu-client start returned 1

Cookbook Trace:


/var/chef/cookbooks/sensu/providers/service.rb:127:in `block in class_from_file’

Resource Declaration:


In /var/chef/cookbooks/sensu/providers/service.rb

46: service new_resource.service do

47: provider service_provider

48: supports :status => true, :restart => true

49: retries 3

50: retry_delay 5

51: action :nothing

52: subscribes :restart, resources(“ruby_block[sensu_service_trigger]”), :delayed

53: end

54: when “runit”

Compiled Resource:


Declared in /var/chef/cookbooks/sensu/providers/service.rb:46:in `load_current_resource’

service(“sensu-client”) do

provider Chef::Provider::Service::Redhat

action [:nothing]

supports {:status=>true, :restart=>true}

retries 0

retry_delay 5

guard_interpreter :default

service_name “sensu-client”

enabled true

pattern “sensu-client”

cookbook_name :sensu

end

================================================================================

Error executing action start on resource ‘sensu_service[sensu-client]’

================================================================================

Mixlib::ShellOut::ShellCommandFailed


service[sensu-client] (/var/chef/cookbooks/sensu/providers/service.rb line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

---- Begin output of /sbin/service sensu-client start ----

[FAILED]UT: Starting sensu-client[FAILED]

STDERR:

---- End output of /sbin/service sensu-client start ----

Ran /sbin/service sensu-client start returned 1

Cookbook Trace:


/var/chef/cookbooks/sensu/providers/service.rb:127:in `block in class_from_file’

Resource Declaration:


In /var/chef/cookbooks/sensu/recipes/client_service.rb

20: sensu_service “sensu-client” do

21: init_style node.sensu.init_style

22: action [:enable, :start]

23: end

Compiled Resource:


Declared in /var/chef/cookbooks/sensu/recipes/client_service.rb:20:in `from_file’

sensu_service(“sensu-client”) do

action [:enable, :start]

retries 0

retry_delay 2

guard_interpreter :default

cookbook_name :sensu

recipe_name “client_service”

init_style “sysv”

service “sensu-client”

end

Running handlers:

[2014-10-01T11:32:37+00:00] ERROR: Running exception handlers

Running handlers complete

[2014-10-01T11:32:37+00:00] ERROR: Exception handlers complete

[2014-10-01T11:32:37+00:00] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out

Chef Client failed. 2 resources updated in 30.131740663 seconds

[2014-10-01T11:32:37+00:00] ERROR: sensu_service[sensu-client] (sensu::client_service line 20) had an error: Mixlib::ShellOut::ShellCommandFailed: service[sensu-client] (/var/chef/cookbooks/sensu/providers/service.rb line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

---- Begin output of /sbin/service sensu-client start ----

[FAILED]Starting sensu-client[FAILED]

STDERR:

---- End output of /sbin/service sensu-client start ----

Ran /sbin/service sensu-client start returned 1

[2014-10-01T11:32:37+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

``

is any idea?