chef-boneyard / push-jobs-cookbook

Development repository for Chef Cookbook push-jobs
https://supermarket.chef.io/cookbooks/push-jobs
Apache License 2.0
21 stars 43 forks source link

Getting Below error while installing push-jobs cookbook on node -- OS is redhat #65

Closed ankushgupta closed 7 years ago

ankushgupta commented 8 years ago
[2015-12-24T03:45:25-05:00] INFO: ['push_jobs']['package_url'] and ['push_jobs']['package_checksum'] not set. Chef Push client will be installed from CHEF's public repositories.
Converging 10 resources
Recipe: push-jobs::linux
  * chef_ingredient[push-client] action install[2015-12-24T03:45:25-05:00] INFO: Processing chef_ingredient[push-client] action install (push-jobs::linux line 47)

  Recipe: <Dynamically Defined Resource>
    * chef_gem[mixlib-install] action install[2015-12-24T03:45:25-05:00] INFO: Processing chef_gem[mixlib-install] action install (dynamically defined)
WARN: Unresolved specs during Gem::Specification.reset:
      httpclient (>= 2.2.0.2, ~> 2.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
 (up to date)

    ================================================================================
    Error executing action `install` on resource 'chef_ingredient[push-client]'
    ================================================================================

    LoadError
    ---------
    cannot load such file -- mixlib/install/product

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/chef-ingredient/libraries/helpers.rb:86:in `ensure_mixlib_install_gem_installed!'
    /var/chef/cache/cookbooks/chef-ingredient/libraries/helpers.rb:39:in `ingredient_package_name'
    /var/chef/cache/cookbooks/chef-ingredient/libraries/rhel_handler.rb:67:in `block in configure_package'
    /var/chef/cache/cookbooks/chef-ingredient/libraries/rhel_handler.rb:65:in `configure_package'
    /var/chef/cache/cookbooks/chef-ingredient/libraries/rhel_handler.rb:21:in `handle_install'
    /var/chef/cache/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb:54:in `block in <class:ChefIngredient>'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/push-jobs/recipes/linux.rb

     47: chef_ingredient 'push-client' do
     48:   version package_version || node['push_jobs']['package_version']
     49:   package_source "#{Chef::Config[:file_cache_path]}/#{package_file}" if package_url
     50: end
     51:

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/push-jobs/recipes/linux.rb:47:in `from_file'

    chef_ingredient("push-client") do
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :chef_ingredient
      cookbook_name "push-jobs"
      recipe_name "linux"
      product_name "push-client"
    end

[2015-12-24T03:45:26-05:00] INFO: Running queued delayed notifications before re-raising exception

Running handlers:
[2015-12-24T03:45:26-05:00] ERROR: Running exception handlers
Running handlers complete
[2015-12-24T03:45:26-05:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 02 seconds
[2015-12-24T03:45:26-05:00] INFO: Sending resource update report (run-id: 9ca8ca9a-95f9-4c95-84ec-ac6b1c08f359)
[2015-12-24T03:45:26-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2015-12-24T03:45:26-05:00] ERROR: chef_ingredient[push-client] (push-jobs::linux line 47) had an error: LoadError: cannot load such file -- mixlib/install/product
[2015-12-24T03:45:26-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
ricardo-larosa commented 8 years ago

Hi, I got this error recently. I fixed it by upgrading the chef-client on the node.

Good luck!

abhi-paul commented 8 years ago

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

charlesjohnson commented 8 years ago

@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
tiagobevilaqua commented 8 years ago

Your node is behind a firewall? It has Internet connectivity?

gliptak commented 8 years ago

Consider pre-installing runit and set `default['runit']['prefer_local_yum'] = true

tas50 commented 8 years ago

@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.

gliptak commented 8 years ago

@tas50 So would the install on RHEL7+ complete without runit preinstalled? Thanks

cheeseplus commented 7 years ago

So without runit pre-installed on RHEL7 this will just work. Closing.