kit
2010-Jun-08 09:11 UTC
[Puppet Users] Could not retrieve catalog from remote server: undefined method `closed?'' for nil:NilClass
We are getting this frustrating error on all of our servers after restarting the puppet server. Can''t seem to get rid of it no matter what. The following pops up in /var/log/messages after trying to start puppetd: Jun 8 10:59:04 svn001 puppetd[92558]: Could not retrieve catalog; skipping run Jun 8 10:59:18 svn001 puppetd[92597]: Could not retrieve catalog from remote server: undefined method `closed?'' for nil:NilClass Jun 8 10:59:18 svn001 puppetd[92597]: Not using cache on failed catalog Trying to start puppetd in test mode: ~# /usr/local/sbin/puppetd --test err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find template ''nagios/nrpe.cfg/MASTER.erb'' at /usr/ local/etc/puppet/modules/nrpe/manifests/init.pp:22 on node svn001.mid.no warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run I have verified multiple times that the template puppet claims not to exists actually does exists so it must be a bogus error message. If I start ruby in debug mode and puppet in test the error message is different: ~# /usr/local/bin/ruby --debug /usr/local/sbin/puppetd --server puppet.kit.no --rundir /var/run/puppet --test Exception `OpenSSL::SSL::SSLError'' at /usr/local/lib/ruby/1.8/openssl/ ssl.rb:123 - hostname was not match with the server certificate Exception `NoMethodError'' at /usr/local/lib/ruby/1.8/net/http.rb:1060 - undefined method `closed?'' for nil:NilClass err: Could not retrieve catalog from remote server: undefined method `closed?'' for nil:NilClass warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run However if I ommit the --test part in debug mode the certificate error goes away and I get the usual error message in the /var/log/message (Could not retrieve catalog from remote server: undefined method `closed?'' for nil:NilClass). So now I''m just really confused about the whole thing, been fighting with it for half a day. Anyone got some insights. Funny thing is that it was working fine until the reboot, but no changes were made... -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
James Turnbull
2010-Jun-08 16:46 UTC
Re: [Puppet Users] Could not retrieve catalog from remote server: undefined method `closed?'' for nil:NilClass
kit wrote:> If I start ruby in debug mode and puppet in test the error message is > different: > ~# /usr/local/bin/ruby --debug /usr/local/sbin/puppetd --server > puppet.kit.no --rundir /var/run/puppet --test > Exception `OpenSSL::SSL::SSLError'' at /usr/local/lib/ruby/1.8/openssl/ > ssl.rb:123 - hostname was not match with the server certificate > Exception `NoMethodError'' at /usr/local/lib/ruby/1.8/net/http.rb:1060 > - undefined method `closed?'' for nil:NilClass > err: Could not retrieve catalog from remote server: undefined method > `closed?'' for nil:NilClass > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > However if I ommit the --test part in debug mode the certificate error > goes away and I get the usual error message in the /var/log/message > (Could not retrieve catalog from remote server: undefined method > `closed?'' for nil:NilClass). So now I''m just really confused about the > whole thing, been fighting with it for half a day. Anyone got some > insights. Funny thing is that it was working fine until the reboot, > but no changes were made... >What Ruby version and platform are you on? This rather annoying message is often the result of a Ruby 1.8.7 bug that hides the actual problem. See: http://projects.puppetlabs.com/issues/3101 And the patch (in Puppet 0.25.5): http://projects.puppetlabs.com/projects/puppet/repository/revisions/ae0b0bf23e418e8c6665e9dc135148b78bdbd913 I suspect the underlying message above about a hostname mismatch is your actual problem - has anything changed there? Regards James Turnbull -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
kit
2010-Jun-09 07:28 UTC
[Puppet Users] Re: Could not retrieve catalog from remote server: undefined method `closed?'' for nil:NilClass
Thanks James, I installed the patch and got the proper error message "err: Could not retrieve catalog from remote server: hostname was not match with the server certificate". I''m using ruby 1.8.7. It''s still weird however that it complains about the hostname as it was working before. Nevertheless, I remade the CA and it''s now working so I''m happy. On 8 Jun, 18:46, James Turnbull <ja...@puppetlabs.com> wrote:> kit wrote: > > If I start ruby in debug mode and puppet in test the error message is > > different: > > ~# /usr/local/bin/ruby --debug /usr/local/sbin/puppetd --server > > puppet.kit.no --rundir /var/run/puppet --test > > Exception `OpenSSL::SSL::SSLError'' at /usr/local/lib/ruby/1.8/openssl/ > > ssl.rb:123 - hostname wasnotmatch with theservercertificate > > Exception `NoMethodError'' at /usr/local/lib/ruby/1.8/net/http.rb:1060 > > - undefined method `closed?'' for nil:NilClass > > err:Couldnotretrievecatalogfromremoteserver: undefined method > > `closed?'' for nil:NilClass > > warning:Notusing cache on failedcatalog > > err:Couldnotretrievecatalog; skipping run > > > However if I ommit the --test part in debug mode the certificate error > > goes away and I get the usual error message in the /var/log/message > > (Couldnotretrievecatalogfromremoteserver: undefined method > > `closed?'' for nil:NilClass). So now I''m just really confused about the > > whole thing, been fighting with it for half a day. Anyone got some > > insights. Funny thing is that it was working fine until the reboot, > > but no changes were made... > > What Ruby version and platform are you on? This rather annoying message > is often the result of a Ruby 1.8.7 bug that hides the actual problem. > > See: > > http://projects.puppetlabs.com/issues/3101 > > And the patch (in Puppet 0.25.5): > > http://projects.puppetlabs.com/projects/puppet/repository/revisions/a... > > I suspect the underlying message above about a hostname mismatch is your > actual problem - has anything changed there? > > Regards > > James Turnbull-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Maybe Matching Threads
- info: Retrieving plugin, err: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': undefined method `closed?' for nil:NilClass
- Undefined method 'closed?' for nil:NilClass
- Could not set file on ensure: undefined method `[]'' for nil:NilClass
- Could not request certificate: undefined method `closed?' for nil:NilClass
- undefined method `[]' for nil:NilClass