Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not start service - plugin file permissions #465

Closed
brettswift opened this issue Jan 21, 2016 · 2 comments
Closed

Could not start service - plugin file permissions #465

brettswift opened this issue Jan 21, 2016 · 2 comments

Comments

@brettswift
Copy link

First off - this module works great in most cases.. I have a VM template given to me that I have to run this on, however, the service won't start on this one.

Initially I thought it was due to a umask issue, set to 027. I've tested removing that setting (/etc/sysconfig/init) purging sensu, and reinstalling - with no luck.

On a clean CentOS image (from puppetlabs - CentOS 6.4 x64 running puppet 4), my class works.

I'm wondering if there's something I could ensure - that could be a dependency and mentioned in the docs of this module, or if it's something this module could fix?

For the most part I know my way around a RHEL box but I'm a software dev, not a sysadmin :) FYI in case you think there's something I haven't checked. (Maybe removing the umask didn't take effect?)

Using sensu-puppet version: 2.0.0

File permissions causing this error: (mode 750)
ls -lah /opt/sensu/embedded/lib/ruby/gems/2.0.0/gems

 ~ ~ ~
drwxr-xr-x  4 root root 4096 Jan 21 06:58 sensu-extension-1.1.2
drwxr-xr-x  4 root root 4096 Jan 21 06:58 sensu-extensions-1.2.0
drwxr-xr-x  4 root root 4096 Jan 21 06:58 sensu-logger-1.0.0
drwxr-xr-x  4 root root 4096 Jan 21 06:58 sensu-plugin-1.2.0
drwxr-x---  4 root root 4096 Jan 21 06:59 sensu-plugins-cpu-checks-0.0.3
drwxr-x---  4 root root 4096 Jan 21 06:59 sensu-plugins-disk-checks-1.0.2
drwxr-x---  4 root root 4096 Jan 21 07:00 sensu-plugins-dns-0.0.5
drwxr-x---  4 root root 4096 Jan 21 06:59 sensu-plugins-http-0.2.0
 ~ ~ ~

Error:

puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) change from stopped to running failed: Could not start Service[sensu-client]: Execution of '/sbin/service sensu-client start' returned 1: Starting sensu-client/opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:959:in `read': Permission denied - /opt/sensu/embedded/lib/ruby/gems/2.0.0/specifications/language-0.6.0.gemspec (Errno::EACCES)
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:959:in `load'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:644:in `block (2 levels) in each_spec'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:643:in `each'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:643:in `block in each_spec'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:642:in `each_spec'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:658:in `each_normal'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:669:in `_all'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/specification.rb:822:in `each'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `find_all'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/dependency.rb:253:in `matching_specs'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/dependency.rb:277:in `to_specs'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `gem'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) #011from /opt/sensu/bin/sensu-client:22:in `<main>'
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]/ensure) [FAILED]#015[FAILED]
puppet-agent[17639]: (/Stage[main]/Sensu::Client::Service/Service[sensu-client]) Triggered 'refresh' from 5 events
puppet-agent[17639]: (Class[Sensu::Client::Service]) Unscheduling all events on Class[Sensu::Client::Service]
puppet-agent[17639]: (/Stage[main]/Sensu::Api::Service/Service[sensu-api]) Dependency Service[sensu-client] has failures: true
puppet-agent[17639]: (/Stage[main]/Sensu::Api::Service/Service[sensu-api]) Skipping because of failed dependencies
puppet-agent[17639]: (/Stage[main]/Sensu::Api::Service/Service[sensu-api]) Unscheduling all events on Service[sensu-api]
@brettswift brettswift changed the title Could not start service - file permissions Could not start service - plugin file permissions Jan 21, 2016
@jlambert121
Copy link
Contributor

Honestly I haven't ever seen this - I'd start by just removing the sensu RPM and deleting the entire /opt/sensu directory and let puppet do it's thing.

@jlambert121
Copy link
Contributor

@brettswift Let us know if this continues to be a problem, but since this module doesn't touch those files themselves (just manages the package they are part of) I'm thinking there's something else causing your issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants