Resolving Puppet Error: Could not retrieve catalog from remote server: undefined method `closed?โ for nil:NilClass
Tags: ec2, linux, puppet, ruby, sysadmin, systems administration, troubleshooting
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.