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

Error executing action install on resource 'gem_package[sensu-plugins-uptime-checks]' #539

Open
gopalvd opened this issue Feb 16, 2017 · 2 comments

Comments

@gopalvd
Copy link

gopalvd commented Feb 16, 2017

I am using the below code snippet in my recipe to create the sensu check definition

sensu_gem 'sensu-plugins-uptime-checks'
sensu_check 'check_uptime_metrics' do
command 'metrics-uptime.rb --scheme sensu_stats.:::name:::'
standalone true
type 'metric'
interval 30
handlers ['graphite']
end


I am getting the below error when running the chef client.

  • sensu_gem[sensu-plugins-uptime-checks] action install (up to date)
    • gem_package[sensu-plugins-uptime-checks] action install

      ================================================================================
      Error executing action install on resource 'gem_package[sensu-plugins-uptime-checks]'

      Mixlib::ShellOut::ShellCommandFailed

      Expected process to exit with [0], but received '2'
      ---- Begin output of /opt/sensu/embedded/bin/gem install "sensu-plugins-uptime-checks" -q --no-rdoc --no-ri ----
      STDOUT:
      STDERR: ERROR: Could not find a valid gem 'sensu-plugins-uptime-checks' (>= 0) in any repository
      ---- End output of /opt/sensu/embedded/bin/gem install "sensu-plugins-uptime-checks" -q --no-rdoc --no-ri ----
      Ran /opt/sensu/embedded/bin/gem install "sensu-plugins-uptime-checks" -q --no-rdoc --no-ri returned 2

      Resource Declaration:

      In /var/chef/cache/cookbooks/sensu/providers/gem.rb

      2: g = gem_package new_resource.name do
      3: gem_binary Sensu::Helpers.gem_binary
      4: version new_resource.version
      5: source new_resource.source
      6: options new_resource.options
      7: end
      8:

      Compiled Resource:

      Declared in /var/chef/cache/cookbooks/sensu/providers/gem.rb:2:in `block in class_from_file'

      gem_package("sensu-plugins-uptime-checks") do
      package_name "sensu-plugins-uptime-checks"
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :gem_package
      cookbook_name "sensu_client"
      gem_binary "/opt/sensu/embedded/bin/gem"
      end

      Platform:

      x86_64-linux

Running handlers:
Running handlers complete
Chef Client failed. 2 resources updated in 28 seconds

Is there something i can get help on?

@majormoses
Copy link
Contributor

I dont think this is so much with your use of chef but something else going wrong. Can you try running this manually /opt/sensu/embedded/bin/gem install sensu-plugins-uptime-checks -v 1.0.0 and verify it has the same output as below. If that fails then could you open an issue on the plugin repo and ping me on it?

@amandafc-BYU
Copy link

Try: sudo /usr/bin/gem install forward -q --no-document -v "1.1.7" and rerun chef script.

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