0
votes

When i am executing the command "chef-client" on my node, I an getting the error "Error executing the action install on resource 'yum_package[apache2]". The main resaons for this is - Could not contact CDS load balancer rhui2-cds01.us-east-1.aws.ce.redhat.com, trying others.The node is Amazon Linux EC2 instance. The chef server is Chef hosted. Please check the logs below.

Starting Chef Client, version 13.10.4 resolving cookbooks for run list: ["apache"] Synchronizing Cookbooks: - apache (0.1.0) Installing Cookbook Gems: Compiling Cookbooks... Converging 2 resources Recipe: apache::default * yum_package[apache2] action install

================================================================================
Error executing action `install` on resource 'yum_package[apache2]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
STDOUT: [option installonlypkgs] kernel kernel-bigmem installonlypkg(kernel) installonlypkg(kernel-module) installonlypkg(vm) kernel-enterprise kernel-smp kernel-debug kernel-unsupported kernel-source kernel-devel kernel-PAE kernel-PAE-debug
Could not contact CDS load balancer rhui2-cds01.us-east-1.aws.ce.redhat.com, trying others.
STDERR: Traceback (most recent call last):
  File "/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4/lib/chef/provider/package/yum/yum-dump.py", line 299, in <module>
    status = main()
  File "/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4/lib/chef/provider/package/yum/yum-dump.py", line 288, in main
    return yum_dump(options)
  File "/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4/lib/chef/provider/package/yum/yum-dump.py", line 214, in yum_dump
    return dump_packages(yb, options.package_list, options.output_provides)
  File "/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4/lib/chef/provider/package/yum/yum-dump.py", line 125, in dump_packages
    db = yb.doPackageLists(list)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2964, in doPackageLists
    avail = self.pkgSack.returnPackages(repoid=repoid,
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1074, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 778, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 347, in populateSack
    self.doSetup()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 122, in doSetup
    self.ayum.plugins.run('prereposetup')
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/rhui-lb.py", line 135, in prereposetup_hook
    ', '.join(cds_balancers))
yum.plugins.PluginYumExit: Could not contact any CDS load balancers: rhui2-cds01.us-east-1.aws.ce.redhat.com, rhui2-cds02.us-east-1.aws.ce.redhat.com.
---- End output of /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 ----
Ran /usr/bin/python /opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.10.4/lib/chef/provider/package/yum/yum-dump.py --options --installed-provides --yum-lock-timeout 30 returned 1

Resource Declaration:
---------------------
# In /home/ec2-user/.chef/cache/cookbooks/apache/recipes/default.rb

  8: package 'apache2' do
  9:    package_name 'httpd'
 10:    action :install
 11: end
 12: 

Compiled Resource:
------------------
# Declared in /home/ec2-user/.chef/cache/cookbooks/apache/recipes/default.rb:8:in `from_file'

yum_package("apache2") do
  package_name "httpd"
  action [:install]
  default_guard_interpreter :default
  declared_type :package
  cookbook_name "apache"
  recipe_name "default"
end

System Info:
------------
chef_version=13.10.4
platform=redhat
platform_version=7.5
ruby=ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]
program_name=chef-client worker: ppid=11667;start=18:00:05;
executable=/opt/chef/bin/chef-client
1

1 Answers

0
votes

This error is not related to Chef, as you can see from the message yum is not able to reach the package repository server.