How to fix this 'set gid' problem?



I am using a chef cookcook to set up sensu client.

Here is the relevant part of my vagrant file:

config.vm.provision “chef_zero” do |chef|
chef.data_bags_path = "data_bags"
chef.add_recipe 'sensu::default’
chef.add_recipe ‘sensu::client_service’

During vagrant up, I am getting a lot of error like this:

==> default:

==> default: Error executing action restart on resource
==> default:

==> 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-client restart ----
==> default: STDOUT: * Stopping sensu-client
==> default: …fail!
==> default: * Starting sensu-client
==> default: …fail!
==> default: STDERR:
==> default: ---- End output of /etc/init.d/sensu-client restart ----
==> default: Ran /etc/init.d/sensu-client restart returned 1

If I run the command manually, it shows the root cause of the problem

vagrant@vagrant-ubuntu-trusty-64:~$ /etc/init.d/sensu-client start

  • Starting sensu-client
    start-stop-daemon: unable to set gid to
    999 (Operation not permitted)


999 is the group number of ‘sensu’ group

How can I fix this issue via chef cookbook?

Thanks, Tony