August 13, 2015 12:00
This is a collection of error messages I got while setting up a puppet infrastructure and testing modules, as well as their reasons ans solutions.
On an agent:
Debug: Failed to load library 'msgpack' for feature 'msgpack' Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
on the master:
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing Debug: file_metadata supports formats: pson b64_zlib_yaml yaml raw
This happens when you run puppet agent, for instance.
msgpack is an efficient serialisation format. Puppet uses is (experimentally) when communicating between master and agent. This format requires a gem, which if not installed will give this debug message. This is completely harmless, it just pollutes your logs.
Just install the msgpack ruby gem. Depending on your system, you can
#debian based: apt-get install ruby-msgpack #generic gem install msgpack
This immediately removes the debug messages. To actually use msgpack, you need to add in the [main] or [agent] section of puppet.conf the line:
preferred_serialization_format=msgpack
Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve information from environment $yourenvironment source(s) puppet://localhost/pluginfacts
Puppet agent run.
If no module has a facts.d folder, puppet will throw this error. This is an actual bug in puppet, at least version 3.7.3.
Option 1: Just discard. This is shown as an error, but has no impact and the run will carry on uninterrupted.
Option 2: actually create a facts.d folder in a module.
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item classes in any Hiera data file and no default supplied on node aws-nl-puppetmaster.dp.webpower.io
Your puppet tests were all working fine from vagrant. You just installed a puppet master and the first agent run gives you this error.
Check your hiera.yaml file (in /etc/puppet/hiera.yaml, /etc/puppetlabs/puppet/hiera.yaml or pointed by hiera_config from your puppet.conf). There is a :datadir section, telling puppet where to find hiera data. If the path there is absolute, then it should directly point to the directory. If it is relative, then it works only under vagrant and is based on puppet.working_dir.
Many options are possible.
Note that if you change hiera.yaml, you need to reload the puppet master as hiera.yaml is only read at startup.
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node $nodename: No such file or directory @ dir_s_rmdir - /var/puppet/hiera/node/$nodename.yaml20150812-5415-1802nxn.lock
Puppet agent run
chown -R puppet:puppet /var/puppet/hiera
This 'if' statement is not productive.
followed by some more explnation depending on the context.
Puppet agent run
Puppet does not want to leave alone, and pretends to know better than me. I might want to have a if (false) {…} or if (condition) {empty block} for whatever reasons, but no, puppet very violently and rudely bails out. There is a bug discussion about it as well as a fix to change the wording, but the behaviour will stay.
Comment out what puppet does not like.
SSL_connect returned=1 errno=0 state=SSLv3 read server session ticket A: sslv3 alert certificate revoked
or
Wrapped exception: SSL_connect returned=1 errno=0 state=unknown state: certificate verify failed: [self signed certificate in certificate chain for /CN=Puppet CA: puppetmaster.example.com]
Puppet agent run
You probably revoked or clean certificates on the puppet master, but did not inform the agent about it. or maybe you are now pointing to a new puppetmaster.
You can fix this by cleaning the agent as well:
sudo rm -r /etc/puppet/ssl sudo rm -r /var/lib/puppet/ssl
Posted by This data guy
Tags: Automation, errors, puppet
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.