puppet agent is unable to connect with puppet master

asked 2017-06-28 08:05:07 -0500

kanchan gravatar image

updated 2017-06-28 14:16:37 -0500

DarylW gravatar image

puppetmaster version 3.6.2,rubyversion 1.8.7,RHOS - 6.6 Puppetagent version 3.8.4,rubyversion 2.0,RHOS 7

trying puppetagent -- test -trace

Error: Failed to apply catalog: Could not retrieve local facts: undefined method `to_a' for "ens160":String
/var/lib/puppet/lib/facter/default_gateway.rb:46:in `block (2 levels) in <top (required)>'
/var/lib/puppet/lib/facter/default_gateway.rb:46:in `collect!'
/var/lib/puppet/lib/facter/default_gateway.rb:46:in `block in <top (required)>'
/var/lib/puppet/lib/facter/default_gateway.rb:31:in `each_line'
/var/lib/puppet/lib/facter/default_gateway.rb:31:in `<top (required)>'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:130:in `load'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:130:in `kernel_load'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:115:in `load_file'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:49:in `block (2 levels) in load_all'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:47:in `each'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:47:in `block in load_all'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:45:in `each'
/usr/share/ruby/vendor_ruby/facter/util/loader.rb:45:in `load_all'
/usr/share/ruby/vendor_ruby/facter/util/collection.rb:104:in `load_all'
/usr/share/ruby/vendor_ruby/facter.rb:126:in `to_hash'
/usr/share/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:23:in `find'
/usr/share/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/share/ruby/vendor_ruby/puppet/configurer/fact_handler.rb:15:in `find_facts'
/usr/share/ruby/vendor_ruby/puppet/configurer/fact_handler.rb:31:in `facts_for_uploading'
/usr/share/ruby/vendor_ruby/puppet/configurer.rb:97:in `get_facts'
/usr/share/ruby/vendor_ruby/puppet/configurer.rb:199:in `run_internal'
/usr/share/ruby/vendor_ruby/puppet/configurer.rb:134:in `block in run'
/usr/share/ruby/vendor_ruby/puppet/context.rb:64:in `override'
/usr/share/ruby/vendor_ruby/puppet.rb:246:in `override'
/usr/share/ruby/vendor_ruby/puppet/configurer.rb:133:in `run'
/usr/share/ruby/vendor_ruby/puppet/agent.rb:47:in `block (4 levels) in run'
/usr/share/ruby/vendor_ruby/puppet/agent/locker.rb:20:in `lock'
/usr/share/ruby/vendor_ruby/puppet/agent.rb:47:in `block (3 levels) in run'
/usr/share/ruby/vendor_ruby/puppet/agent.rb:117:in `with_client'
/usr/share/ruby/vendor_ruby/puppet/agent.rb:44:in `block (2 levels) in run'
/usr/share/ruby/vendor_ruby/puppet/agent.rb:82:in `run_in_fork'
/usr/share/ruby/vendor_ruby/puppet/agent.rb:43:in `block in run'
/usr/share/ruby/vendor_ruby/puppet/application.rb:179:in `call'
/usr/share/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
/usr/share/ruby/vendor_ruby/puppet/agent.rb:41:in `run'
/usr/share/ruby/vendor_ruby/puppet/application/agent.rb:361:in `onetime'
/usr/share/ruby/vendor_ruby/puppet/application/agent.rb:327:in `run_command'
/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in `block (2 levels) in run'
/usr/share/ruby/vendor_ruby/puppet/application.rb:507:in `plugin_hook'
/usr/share/ruby/vendor_ruby/puppet/application.rb:381:in `block in run'
/usr/share/ruby/vendor_ruby/puppet/util ...
(more)
edit retag flag offensive close merge delete

Comments

That looks like you may be calling `.to_a` on an object that doesn't have defined way to become an array. Are you loading any custom facts, or is this just a 'fresh' install? Can you run `sudo puppet apply -e 'notice()'` without seeing the same error on your client?

DarylW gravatar imageDarylW ( 2017-06-28 14:18:37 -0500 )edit

,thihenks for the reply...[root@grice ~]$sudo puppet apply -e 'notice()' Error: Could not run: Could not retrieve facts for grice.host.mobistar.be: undefined method `to_a' for "ens160":String

kanchan gravatar imagekanchan ( 2017-06-29 00:06:17 -0500 )edit

Also what is the use of thi scommand and yes we are using our custom facts..

kanchan gravatar imagekanchan ( 2017-06-29 00:06:41 -0500 )edit