Resolving Puppet Error: Could not retrieve catalog from remote server: undefined method `closed?’ for nil:NilClass


I came across this odd puppet error while setting up a puppet client on a host running in amazon EC2 and it took me a bit of head scratching to figure it out.

(/File[/var/lib/puppet/lib]) Failed to generate additional resources using 'eval_generate': undefined method `closed?' for nil:NilClass
 
(/File[/var/lib/puppet/lib]) Failed to retrieve current state of resource: undefined method `closed?' for nil:NilClass Could not retrieve file metadata for puppet://example.com/plugins: undefined method `closed?' for nil:NilClass
 
Could not retrieve catalog from remote server: undefined method `closed?' for nil:NilClass

The problem was that the host name I used in my puppet.conf file as the puppet server (example.com) did not match the host name (cn) of the puppetmaster CA. A quick update to puppet.conf and everything was working as expected!

Another possible cause for this error is an incorrect puppetmaster CA in your puppet config. In general, this error seems to indicate that something isn’t settling right with SSL.

One Response to “Resolving Puppet Error: Could not retrieve catalog from remote server: undefined method `closed?’ for nil:NilClass”

  1. just another john cheng blauwgh » Blog Archive » puppet error: Could not retrieve catalog from remote server: undefined method `closed?’ for nil:NilClass Says:

    […] So.. this guy is correct, in my case: http://backdrift.org/resolving-puppet-error-could-not-retrieve-catalog-from-remote-server-undefined-… […]

Join the Conversation