sensu-chef question: sensu::server_service error messages

Hi,

I am getting these error message from my vagrant up session:

==> default: [2015-01-29T04:17:09+00:00] INFO: Processing sensu_service[sensu-server] action enable (sensu::server_service line 20)

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers for generic sensu_service resource enabled on node include:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers that refused resource sensu_service[sensu-server] were:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers that support resource sensu_service[sensu-server] include:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: no providers supported the resource, falling back to enabled handlers

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers that survived replacement include:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: dynamic provider resolver FAILED to resolve a provider

==> default: [2015-01-29T04:17:09+00:00] DEBUG: Platform ubuntu version 14.04 found

==> default: [2015-01-29T04:17:09+00:00] INFO: Processing service[sensu-server] action enable (/tmp/vagrant-chef/e86b1ff02e36b508220aca634bf8c053/cookbooks/sensu/providers/service.rb line 46)

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] supports status, running

==> default: [2015-01-29T04:17:09+00:00] INFO: service[sensu-server] enabled

==> default: [2015-01-29T04:17:09+00:00] INFO: Processing sensu_service[sensu-server] action start (sensu::server_service line 20)

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers for generic sensu_service resource enabled on node include:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers that refused resource sensu_service[sensu-server] were:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers that support resource sensu_service[sensu-server] include:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: no providers supported the resource, falling back to enabled handlers

==> default: [2015-01-29T04:17:09+00:00] DEBUG: providers that survived replacement include:

==> default: [2015-01-29T04:17:09+00:00] DEBUG: dynamic provider resolver FAILED to resolve a provider

==> default: [2015-01-29T04:17:09+00:00] DEBUG: Platform ubuntu version 14.04 found

==> default: [2015-01-29T04:17:09+00:00] INFO: Processing service[sensu-server] action start (/tmp/vagrant-chef/e86b1ff02e36b508220aca634bf8c053/cookbooks/sensu/providers/service.rb line 46)

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] supports status, running

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] runlevel 0, action stop, priority 20

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] runlevel 1, action stop, priority 20

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] runlevel 2, action start, priority 20

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] runlevel 3, action start, priority 20

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] runlevel 4, action start, priority 20

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] runlevel 5, action start, priority 20

==> default: [2015-01-29T04:17:09+00:00] DEBUG: service[sensu-server] runlevel 6, action stop, priority 20

==> default: [2015-01-29T04:17:11+00:00] INFO: Retrying execution of service[sensu-server], 2 attempt(s) left

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] supports status, running

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] runlevel 0, action stop, priority 20

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] runlevel 1, action stop, priority 20

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] runlevel 2, action start, priority 20

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] runlevel 3, action start, priority 20

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] runlevel 4, action start, priority 20

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] runlevel 5, action start, priority 20

==> default: [2015-01-29T04:17:16+00:00] DEBUG: service[sensu-server] runlevel 6, action stop, priority 20

==> default: [2015-01-29T04:17:17+00:00] INFO: Retrying execution of service[sensu-server], 1 attempt(s) left

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] supports status, running

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] runlevel 0, action stop, priority 20

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] runlevel 1, action stop, priority 20

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] runlevel 2, action start, priority 20

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] runlevel 3, action start, priority 20

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] runlevel 4, action start, priority 20

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] runlevel 5, action start, priority 20

==> default: [2015-01-29T04:17:22+00:00] DEBUG: service[sensu-server] runlevel 6, action stop, priority 20

==> default: [2015-01-29T04:17:23+00:00] INFO: Retrying execution of service[sensu-server], 0 attempt(s) left

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] supports status, running

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] runlevel 0, action stop, priority 20

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] runlevel 1, action stop, priority 20

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] runlevel 2, action start, priority 20

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] runlevel 3, action start, priority 20

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] runlevel 4, action start, priority 20

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] runlevel 5, action start, priority 20

==> default: [2015-01-29T04:17:28+00:00] DEBUG: service[sensu-server] runlevel 6, action stop, priority 20

==> default:

==> default: ================================================================================

==> default: Error executing action start on resource ‘service[sensu-server]’

==> default: ================================================================================

==> default:

==> default: Mixlib::ShellOut::ShellCommandFailed

==> default: ------------------------------------

==> default: Expected process to exit with [0], but received ‘1’

==> default: ---- Begin output of /etc/init.d/sensu-server start ----

==> default: STDOUT: * Starting sensu-server

==> default: …fail!

==> default: STDERR:

==> default: ---- End output of /etc/init.d/sensu-server start ----

==> default: Ran /etc/init.d/sensu-server start returned 1

==> default:

==> default: Cookbook Trace:

==> default: ---------------

==> default: /tmp/vagrant-chef/e86b1ff02e36b508220aca634bf8c053/cookbooks/sensu/providers/service.rb:127:in `block in class_from_file’

==> default:

==> default: Resource Declaration:

==> default: ---------------------

==> default: # In /tmp/vagrant-chef/e86b1ff02e36b508220aca634bf8c053/cookbooks/sensu/providers/service.rb

==> default:

==> default: 46: service new_resource.service do

==> default: 47: provider service_provider

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

==> default: 49: retries 3

==> default: 50: retry_delay 5

==> default: 51: action :nothing

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

==> default: 53: end

==> default: 54: when “runit”

The error message seems to indicate that the chef cookbook tried to start the sensu service three times but all failed.

But if I vagrant ssh into the box and run $ sudo /etc/init.d/sensu-server restart the service seems to run fine.

vagrant@vagrant-ubuntu-trusty-64:/var/log/chef$ sudo /etc/init.d/sensu-server restart

  • Stopping sensu-server [ OK ]

  • Starting sensu-server [ OK ]

I do not yet have a client to test this out but from the ps output the sensu server is running

Here is my vagrant cookbook settings:

config.vm.provision “chef_zero” do |chef|

# Do not need to specify cookbook path because berkshelf plugin

#    handles cookbook management

# Must provide ssl.json in data bag for sensu

chef.data_bags_path = "data_bags"

# Enable this for debug info

chef.log_level = :debug

chef.add_recipe 'apt'

chef.add_recipe 'python'

chef.add_recipe 'vim'

chef.add_recipe 'git'

chef.add_recipe 'sensu::default'

chef.add_recipe 'sensu::rabbitmq'

chef.add_recipe 'sensu::redis'

chef.add_recipe 'sensu::server_service'

chef.json = {

  :git   => {

    :prefix => "/usr/local"

  }

}

end

So my questions:

  1. Why the cookbook needs to run the service three times?

  2. What is the quickest/easiest way to test the sensu server?