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:

Puppet (warning): Unable to fetch my node definition, but the agent run will continue:
Puppet (warning): Could not find terminus rest for indirection node
/File[/var/lib/puppet/lib] (err): Failed to generate additional resources using 'eval_generate': Could not find terminus file for indirection file_metadata
/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
Puppet (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):

[main]
    logdir = /var/log/puppet
    localconfig = $vardir/localconfig
    classfile = $vardir/classes.txt

[agent]
    environment = production
    server = myserver.localdomain.loc
    ca_server = myserver.localdomain.loc

After cleaning-up the configuration, the file looked like this:

[agent]
    ca_server = myserver.localdomain.loc
    server = myserver.localdomain.loc

Afterwards, updating the catalog was working again:

# puppet agent -t
...
Notice: Applied catalog in 1.14 seconds
# systemctl restart puppet.service

Leave a Reply