Centos clients not updating


#1

Hello all,

The reason I am writing to you today is because I have a small collection
of 4 hosts meant to report in to a chef server for updates.

2 of the hosts are Ubuntu 12.04 and two are Centos 5.9. The two Ubuntu
hosts (one of which is the chef server itself) are checking in to the chef
server. But the two centos hosts are not.

Chef client is at Chef 10.18.2 on one ubuntu machine and at Chef 11.4.0 on
the chef server.

Chef client is at Chef 11.4.4 on both centos machines.

I see when I run the chef-client manually on one of the centos hosts I get
the following output:

On the failed nodes I see this output in the run:

[2013-06-15T14:43:54-04:00] INFO: *** Chef 11.4.4 ***
[2013-06-15T14:43:55-04:00] INFO: Run List is [role[base]]
[2013-06-15T14:43:55-04:00] INFO: Run List expands to [apt, nagios::client]
[2013-06-15T14:43:55-04:00] INFO: HTTP Request Returned 404 Not Found: No
routes match the request: /reports/nodes/cloud.jokefire.com/runs
[2013-06-15T14:43:55-04:00] INFO: Starting Chef Run for cloud.jokefire.com
[2013-06-15T14:43:55-04:00] INFO: Running start handlers
[2013-06-15T14:43:55-04:00] INFO: Start handlers complete.
[2013-06-15T14:43:56-04:00] INFO: Loading cookbooks [apache2, apt,
bluepill, build-essential, mysql, nagios, nginx, nginx_simplecgi, ohai,
openssl, perl, php, rsyslog, runit, xml]
e[0m
================================================================================e[0m
e[31mRecipe Compile Error in
/var/chef/cache/cookbooks/apt/resources/preference.rbe[0m
================================================================================e[0m

e[0m
ArgumentErrore[0m
-------------e[0m
wrong number of arguments (2 for 1)e[0m

e[0m
Cookbook Trace:e[0m
---------------e[0m

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
`const_defined?’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
`build_from_file’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:208:in
`load_lwrp_resource’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:193:in
`load_lwrps_from_cookbook’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:192:in
`each’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:192:in
`load_lwrps_from_cookbook’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:120:in
`compile_lwrps’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:119:in
`each’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:119:in
`compile_lwrps’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:72:in
`compile’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context.rb:86:in
`load’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/client.rb:224:in
`setup_run_context’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/client.rb:467:in
`do_run’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/client.rb:200:in
`run’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:190:in
`run_chef_client’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:297:in
`run_application’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:290:in
`loop’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:290:in
`run_application’

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:73:in
run' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/chef-client:26 /usr/bin/chef-client:23:inload’
/usr/bin/chef-client:23e[0m

e[0m
Relevant File Content:e[0m
----------------------e[0m
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:

35:
36: # Evaluates the LWRP resource file and instantiates a new
Resource class.
37: def self.build_from_file(cookbook_name, filename, run_context)
38: rname = filename_to_qualified_string(cookbook_name, filename)
39:
40: # Add log entry if we override an existing light-weight
resource.
41: class_name = convert_to_class_name(rname)
42>> if Resource.const_defined?(class_name, false)
43: old_class = Resource.send(:remove_const, class_name)
44: # CHEF-3432 – Chef::Resource keeps a list of subclasses;
need to
45: # remove old ones from the list when replacing.
46: resource_classes.delete(old_class)
47: Chef::Log.info("#{class_name} light-weight resource already
initialized – overriding!")
48: end
49:
50: resource_class = Class.new(self)
51:
e[0m

e[0m
[2013-06-15T14:43:57-04:00] ERROR: Running exception handlers
[2013-06-15T14:43:57-04:00] FATAL: Saving node information to
/var/chef/cache/failed-run-data.json
[2013-06-15T14:43:57-04:00] ERROR: Exception handlers complete
[2013-06-15T14:43:57-04:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2013-06-15T14:43:57-04:00] FATAL: ArgumentError: wrong number of arguments
(2 for 1)

This is the stacktrace output from the file indicated at the end of client
run output:

Generated at Sat Jun 15 14:43:57 -0400 2013
ArgumentError: wrong number of arguments (2 for 1)
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
const_defined?' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/resource/lwrp_base.rb:42:inbuild_from_file’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:208:in
load_lwrp_resource' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:193:inload_lwrps_from_cookbook’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:192:in
each' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:192:inload_lwrps_from_cookbook’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:120:in
compile_lwrps' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:119:ineach’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:119:in
compile_lwrps' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:72:incompile’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context.rb:86:in
load' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/client.rb:224:insetup_run_context’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/client.rb:467:in
do_run' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/client.rb:200:inrun’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:190:in
run_chef_client' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/application/client.rb:297:inrun_application’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:290:in
loop' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/application/client.rb:290:inrun_application’
/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:73:in
run' /usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/chef-client:26 /usr/bin/chef-client:23:inload’
/usr/bin/chef-client:23

On the second centos host I get the following output:

[2013-06-15T18:51:03+00:00] INFO: *** Chef 11.4.4 ***
[2013-06-15T18:51:08+00:00] INFO: Run List is [role[base]]
[2013-06-15T18:51:08+00:00] INFO: Run List expands to [apt, nagios::client]
[2013-06-15T18:51:08+00:00] INFO: HTTP Request Returned 404 Not Found: No
routes match the request: /reports/nodes/beta.jokefire.com/runs
[2013-06-15T18:51:08+00:00] INFO: Starting Chef Run for beta.jokefire.com
[2013-06-15T18:51:08+00:00] INFO: Running start handlers
[2013-06-15T18:51:08+00:00] INFO: Start handlers complete.
[2013-06-15T18:51:09+00:00] INFO: Loading cookbooks [apache2, apt,
bluepill, build-essential, mysql, nagios, nginx, nginx_simplecgi, ohai,
openssl, perl, php, rsyslog, runit, xml]
e[0m
================================================================================e[0m
e[31mRecipe Compile Error in
/var/chef/cache/cookbooks/apt/resources/preference.rbe[0m
================================================================================e[0m

e[0m
ArgumentErrore[0m
-------------e[0m
wrong number of arguments (2 for 1)e[0m

e[0m
Cookbook Trace:e[0m
---------------e[0m

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
`const_defined?’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
`build_from_file’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:208:in
`load_lwrp_resource’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:193:in
`load_lwrps_from_cookbook’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:192:in
`each’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:192:in
`load_lwrps_from_cookbook’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:120:in
`compile_lwrps’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:119:in
`each’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:119:in
`compile_lwrps’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:72:in
`compile’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context.rb:86:in
load' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/client.rb:224:insetup_run_context’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/client.rb:467:in
do_run' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/client.rb:200:inrun’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:190:in
`run_chef_client’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:297:in
`run_application’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:290:in
`loop’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:290:in
`run_application’

/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:73:in
run' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/chef-client:26 /usr/bin/chef-client:19:inload’
/usr/bin/chef-client:19e[0m

e[0m
Relevant File Content:e[0m
----------------------e[0m
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:

35:
36: # Evaluates the LWRP resource file and instantiates a new
Resource class.
37: def self.build_from_file(cookbook_name, filename, run_context)
38: rname = filename_to_qualified_string(cookbook_name, filename)
39:
40: # Add log entry if we override an existing light-weight
resource.
41: class_name = convert_to_class_name(rname)
42>> if Resource.const_defined?(class_name, false)
43: old_class = Resource.send(:remove_const, class_name)
44: # CHEF-3432 – Chef::Resource keeps a list of subclasses;
need to
45: # remove old ones from the list when replacing.
46: resource_classes.delete(old_class)
47: Chef::Log.info("#{class_name} light-weight resource already
initialized – overriding!")
48: end
49:
50: resource_class = Class.new(self)
51:
e[0m

e[0m
[2013-06-15T18:51:13+00:00] ERROR: Running exception handlers
[2013-06-15T18:51:13+00:00] FATAL: Saving node information to
/var/chef/cache/failed-run-data.json
[2013-06-15T18:51:13+00:00] ERROR: Exception handlers complete
[2013-06-15T18:51:13+00:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[2013-06-15T18:51:13+00:00] FATAL: ArgumentError: wrong number of arguments
(2 for 1)

And this is the stacktrace from the second host:

Generated at Sat Jun 15 18:51:13 +0000 2013
ArgumentError: wrong number of arguments (2 for 1)
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
const_defined?' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/resource/lwrp_base.rb:42:inbuild_from_file’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:208:in
load_lwrp_resource' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:193:inload_lwrps_from_cookbook’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:192:in
each' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:192:inload_lwrps_from_cookbook’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:120:in
compile_lwrps' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:119:ineach’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context/cookbook_compiler.rb:119:in
compile_lwrps' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/run_context/cookbook_compiler.rb:72:incompile’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/run_context.rb:86:in
load' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/client.rb:224:insetup_run_context’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/client.rb:467:in
do_run' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/client.rb:200:inrun’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:190:in
run_chef_client' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/application/client.rb:297:inrun_application’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application/client.rb:290:in
loop' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/../lib/chef/application/client.rb:290:inrun_application’
/usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/application.rb:73:in
run' /usr/lib/ruby/gems/1.8/gems/chef-11.4.4/bin/chef-client:26 /usr/bin/chef-client:19:inload’
/usr/bin/chef-client:19

I was just wondering if I can get some tips on how to get the client to run
smoothly on these hosts.

Thanks!
Tim

GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B


#2

On Sat, Jun 15, 2013 at 7:57 PM, Tim Dunphy bluethundr@gmail.com wrote:

Hello all,

The reason I am writing to you today is because I have a small collection
of 4 hosts meant to report in to a chef server for updates.

2 of the hosts are Ubuntu 12.04 and two are Centos 5.9. The two Ubuntu hosts
(one of which is the chef server itself) are checking in to the chef server.
But the two centos hosts are not.

Chef client is at Chef 10.18.2 on one ubuntu machine and at Chef 11.4.0 on
the chef server.

Chef client is at Chef 11.4.4 on both centos machines.

I see when I run the chef-client manually on one of the centos hosts I get
the following output:

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
`const_defined?’

Presumably installed using gems rather than omnibus?

I was just wondering if I can get some tips on how to get the client to run
smoothly on these hosts.

Use the omnibus installer?

http://www.opscode.com/chef/install/


Alex Kiernan


#3

Hi,

On Sat, Jun 15, 2013 at 11:57 AM, Tim Dunphy bluethundr@gmail.com wrote:

On the failed nodes I see this output in the run:

[2013-06-15T14:43:54-04:00] INFO: *** Chef 11.4.4 ***
[2013-06-15T14:43:55-04:00] INFO: Run List is [role[base]]
[2013-06-15T14:43:55-04:00] INFO: Run List expands to [apt, nagios::client]
[2013-06-15T14:43:55-04:00] INFO: HTTP Request Returned 404 Not Found: No
routes match the request: /reports/nodes/cloud.jokefire.com/runs
[2013-06-15T14:43:55-04:00] INFO: Starting Chef Run for cloud.jokefire.com
[2013-06-15T14:43:55-04:00] INFO: Running start handlers
[2013-06-15T14:43:55-04:00] INFO: Start handlers complete.
[2013-06-15T14:43:56-04:00] INFO: Loading cookbooks [apache2, apt,
bluepill, build-essential, mysql, nagios, nginx, nginx_simplecgi, ohai,
openssl, perl, php, rsyslog, runit, xml]
[0m

[0m
[31mRecipe Compile Error in
/var/chef/cache/cookbooks/apt/resources/preference.rb [0m

[0m

[0m
ArgumentError [0m
------------- [0m
wrong number of arguments (2 for 1) [0m

[0m
Cookbook Trace: [0m
--------------- [0m

/usr/lib64/ruby/gems/1.8/gems/chef-11.4.4/bin/…/lib/chef/resource/lwrp_base.rb:42:in
`const_defined?’

Looks like you’re using Ruby 1.8.

Chef is optimized (built?) to run on 1.9.

Install Chef using Opscode’s vendored ‘omnibus’ packages, these provide an
embedded Ruby interpreter known to work:

http://opscode.com/chef/install

HTH,

-aob