Closed ankushgupta closed 7 years ago
Hi, I got this error recently. I fixed it by upgrading the chef-client on the node.
Good luck!
Getting Below error while installing push-jobs cookbook on node (node is Oracle Linux 7+ of RHEL family)
$ sudo chef-client
Starting Chef Client, version 12.9.41
resolving cookbooks for run list: ["push-jobs"]
Synchronizing Cookbooks:
- push-jobs (2.8.0)
- runit (1.7.8)
- packagecloud (0.2.0)
- windows (1.41.0)
- chef_handler (1.4.0)
- chef-ingredient (0.18.4)
Installing Cookbook Gems:
Compiling Cookbooks...
Converging 12 resources
Recipe: push-jobs::install
* remote_file[/var/chef/cache/push-jobs-client-2.1.0-1.el7.x86_64.rpm] action create (up to date)
* chef_ingredient[push-jobs-client] action install
Recipe: <Dynamically Defined Resource>
* chef_gem[mixlib-install] action install (up to date)
* ruby_block[stop chef run] action nothing (skipped due to action :nothing)
* yum_package[push-jobs-client] action install (up to date)
(up to date)
Recipe: push-jobs::config
* directory[/etc/chef] action create (up to date)
* template[/etc/chef/push-jobs-client.rb] action create (up to date)
Recipe: runit::default
* service[runit] action nothing (skipped due to action :nothing)
* execute[start-runsvdir] action nothing (skipped due to action :nothing)
* execute[runit-hup-init] action nothing (skipped due to action :nothing)
* packagecloud_repo[imeyer/runit] action add
================================================================================
Error executing action `add` on resource 'packagecloud_repo[imeyer/runit]'
================================================================================
RuntimeError
------------
#<Net::HTTPNotFound 404 Not Found readbody=true>
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/packagecloud/libraries/helper.rb:20:in `get'
/var/chef/cache/cookbooks/packagecloud/providers/repo.rb:80:in `install_rpm'
/var/chef/cache/cookbooks/packagecloud/providers/repo.rb:12:in `block in class_from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/runit/recipes/default.rb
42: packagecloud_repo 'imeyer/runit' unless node['runit']['prefer_local_yum']
43: package 'runit'
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/runit/recipes/default.rb:42:in `from_file'
packagecloud_repo("imeyer/runit") do
action [:add]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :packagecloud_repo
cookbook_name "runit"
recipe_name "default"
type "rpm"
base_url "https://packagecloud.io"
repository "imeyer/runit"
end
Platform:
---------
x86_64-linux
Running handlers:
[2016-05-24T22:01:07+05:30] ERROR: Running exception handlers
Running handlers complete
[2016-05-24T22:01:07+05:30] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 08 seconds
[2016-05-24T22:01:08+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-05-24T22:01:08+05:30] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-05-24T22:01:08+05:30] ERROR: packagecloud_repo[imeyer/runit] (runit::default line 42) had an error: RuntimeError: #<Net::HTTPNotFound 404 Not Found readbody=true>
[2016-05-24T22:01:08+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
above error i am getting even after follow steps mentioned on the below link: https://docs.chef.io/install_push_jobs.html
@abhi-paul The error you're seeing here is in the runit cookbook. It looks like there's a 404 being thrown when the runit cookbook tries to subscribe to the runit Packagecloud repository, to get the runit package.
Recipe: runit::default
* service[runit] action nothing (skipped due to action :nothing)
* execute[start-runsvdir] action nothing (skipped due to action :nothing)
* execute[runit-hup-init] action nothing (skipped due to action :nothing)
* packagecloud_repo[imeyer/runit] action add
================================================================================
Error executing action `add` on resource 'packagecloud_repo[imeyer/runit]'
================================================================================
RuntimeError
------------
#<Net::HTTPNotFound 404 Not Found readbody=true>
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/packagecloud/libraries/helper.rb:20:in `get'
/var/chef/cache/cookbooks/packagecloud/providers/repo.rb:80:in `install_rpm'
/var/chef/cache/cookbooks/packagecloud/providers/repo.rb:12:in `block in class_from_file'
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/runit/recipes/default.rb
42: packagecloud_repo 'imeyer/runit' unless node['runit']['prefer_local_yum']
43: package 'runit'
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/runit/recipes/default.rb:42:in `from_file'
packagecloud_repo("imeyer/runit") do
action [:add]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :packagecloud_repo
cookbook_name "runit"
recipe_name "default"
type "rpm"
base_url "https://packagecloud.io"
repository "imeyer/runit"
end
Your node is behind a firewall? It has Internet connectivity?
Consider pre-installing runit
and set `default['runit']['prefer_local_yum'] = true
@ankushgupta If you're using RHEL 7+ or Ubuntu this cookbook will no longer require Runit, which will resolve the issues you're seeing here. Unfortunately RHEL 6 is still going to have this problem as it doesn't have a reliable init system so Runit is used instead.
@tas50 So would the install on RHEL7+ complete without runit
preinstalled? Thanks
So without runit pre-installed on RHEL7 this will just work. Closing.