Puppet common errors

As setting up Puppet server and agents using VMs provided by Puppetlabs is simple as shooting fish in a barrel, setting it up on actual servers may be a little more annoying.

Here are some errors I encountered white doing it for the first time.

1. 404 Not Found while installing modules

It’s common that tutorials are mentioning installing puppet-module gem to easily download and install Puppet modules. I think it’s a good practice, but they don’t mention that it you install Puppet from official packages you’ll get version 2.7.x, and installed gem will work with Puppet 3. That’s causing 404 Not Found error when trying to install module using puppet module install command.

To solve it, just install Puppet 3 from Puppetlabs.

wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
dpkg -i puppetlabs-release-precise.deb
apt-get update

2. puppet agent –test – unknown protocol error

There can be two possible problems causing this error.

The error:

root@puppethost:~# puppet agent --test
Error: Failed to apply catalog: SSL_connect returned=1 errno=0 state=unknown state: unknown protocol
Error: Could not send report: SSL_connect returned=1 errno=0 state=unknown state: unknown protocol

One possible cause is a problem with certificates. You can fix that quickly by stopping the daemon, removing certificates and run test again. You’ll have to accept client certificate on Puppet agent host.

root@puppethost:~# /etc/init.d/puppet stop
root@puppethost:~# find /var/lib/puppet -type f -print0 | xargs -0r rm
root@puppethost:~# puppet agent --test

The other problem may be caused by the configuration on agent. You should add puppet server in puppet.conf file:


Fly safe and be a nice puppeteer!

More read in documentation: Learning Puppet