`puppet agent -tv` command fails with error `Failed to generate external nodes for client.example.com | NoMethodError: undefined method `to_enc' for #<Nic::Base:0x007f52a2bba930>`

Solution Verified - Updated -

Issue

  • puppet agent -tv command fails with below error:
# puppet agent -tv
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Failed to find client.example.com via exec: Execution of '/etc/puppet/node.rb client.example.com' returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node client.example.com: Failed to find client.example.com via exec: Execution of '/etc/puppet/node.rb client.example.com' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
  • Production log shows the below message while puppet agent is executed:
2017-07-27 14:21:50 b91a95f2 [app] [W] Failed to generate external nodes for client.example.com  | NoMethodError: undefined method `to_enc' for #<Nic::Base:0x007f52a2bba930>  | /opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/attribute_methods.rb:435:in `method_missing'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods.rb:208:in `method_missing'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `map'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/delegation.rb:46:in `map'
 | /usr/share/foreman/app/models/host/managed.rb:417:in `info'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.137/app/models/katello/concerns/host_managed_extensions.rb:53:in `info_with_katello'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:183:in `block in externalNodes'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/mime_responds.rb:433:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/mime_responds.rb:433:in `retrieve_collector_from_mimes'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/mime_responds.rb:256:in `respond_to'
 | /usr/share/foreman/app/controllers/hosts_controller.rb:181:in `externalNodes'

Environment

  • Red Hat Satellite 6.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content