Debugging when puppetd gives `read_cert’: super: no superclass method `read_cert’ (NoMethodError)
I just ran into this obscure problem with Puppet. I’m writing it down in the hopes I will remember not to do something like this again…
$ sudo puppetd --test --noop /opt/local/lib/ruby/site_ruby/1.8/puppet/network/http_pool.rb:41:in `read_cert': super: no superclass method `read_cert' (NoMethodError) from /opt/local/lib/ruby/site_ruby/1.8/puppet/executables/client/certhandler.rb:62:in `read_cert' from /opt/local/lib/ruby/site_ruby/1.8/puppet/executables/client/certhandler.rb:24:in `read_retrieve' from /opt/local/bin/puppetd:347
THE FIX
This error is caused by old puppet binaries that were installed from source that were not removed with subsequent upgrades of puppet itself. The newer versions I am installing install via packages which always installs puppetd into /opt/local/sbin.
To fix this, delete the old puppet binaries from wherever they were installed. In my case it is /opt/local/bin
# Hope there aren't any useful binaries named pu* that are not puppet-based $ rm /opt/local/bin/pu*
Now we have a working puppet run!
Tagged puppet$ sudo puppetd --no-daemonize --verbose --debug --onetime --test debug: Failed to load library 'selinux' for feature 'selinux' debug: Failed to load library 'shadow' for feature 'libshadow' debug: Puppet::Type::User::ProviderNetinfo: file nireport does not exist debug: Puppet::Type::User::ProviderLdap: true value when expecting false debug: Puppet::Type::User::ProviderPw: file pw does not exist debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dscl does not exist debug: Failed to load library 'ldap' for feature 'ldap' debug: /File[/var/puppet/state]: Autorequiring File[/var/puppet] debug: /File[/etc/puppet/ssl/private_keys]: Autorequiring File[/etc/puppet/ssl] debug: /File[/etc/puppet/ssl/certs]: Autorequiring File[/etc/puppet/ssl] debug: /File[/etc/puppet/ssl/certificate_requests]: Autorequiring File[/etc/puppet/ssl] debug: /File[/var/puppet/clientbucket]: Autorequiring File[/var/puppet] debug: /File[/etc/puppet/ssl]: Autorequiring File[/etc/puppet] debug: /File[/etc/puppet/ssl/public_keys]: Autorequiring File[/etc/puppet/ssl] debug: /File[/var/puppet/lib]: Autorequiring File[/var/puppet] debug: /File[/etc/puppet/ssl/private]: Autorequiring File[/etc/puppet/ssl] debug: /File[/var/puppet/client_yaml]: Autorequiring File[/var/puppet] debug: /File[/var/puppet/log]: Autorequiring File[/var/puppet] debug: /File[/var/puppet/facts]: Autorequiring File[/var/puppet] debug: /File[/var/puppet/run]: Autorequiring File[/var/puppet] debug: /File[/var/puppet/state/graphs]: Autorequiring File[/var/puppet/state] debug: Finishing transaction 80433160 with 0 changes