Short tip: Puppet - 'Unable to fetch my node definition, but the agent run will continue'
Doing a recent Puppet agent upgrade from version 3.x to 4.x I stumbled upon the following errors:
1Puppet (warning): Unable to fetch my node definition, but the agent run will continue:
2Puppet (warning): Could not find terminus rest for indirection node
3/File[/var/lib/puppet/lib] (err): Failed to generate additional resources using 'eval_generate': Could not find terminus file for indirection file_metadata
4/File[/var/lib/puppet/lib] (err): Could not evaluate file metadata for puppet://myserver.localdomain.loc/plugins: Could ont find terminus rest for indirection file_metadata
5Puppet (err): Failed to generate additional resources using 'eval_generate': Could not find terminus file for indirection file_metadata
After some research it turned out that the agent configuration file was erroneous. It contained some obsolete parameters and also configured the appropriate Puppet server in the [agent]
section (instead of [main]
section):
1[main]
2 logdir = /var/log/puppet
3 localconfig = $vardir/localconfig
4 classfile = $vardir/classes.txt
5
6[agent]
7 environment = production
8 server = myserver.localdomain.loc
9 ca_server = myserver.localdomain.loc
After cleaning-up the configuration, the file looked like this:
1[agent]
2 ca_server = myserver.localdomain.loc
3 server = myserver.localdomain.loc
Afterwards, updating the catalog was working again:
1# puppet agent -t
2...
3Notice: Applied catalog in 1.14 seconds
4# systemctl restart puppet.service