Ask Your Question

Error 500 on SERVER: Server Error: Failed when searching for node [host] [closed]

asked 2016-12-07 14:15:35 -0500

2Wheels gravatar image

I have a freshly installed node which I would like to connect to my Puppet 4.8.1/Foreman 1.12.4 server. The server is configured to autosign the hosts, which seems to work, because the certificate list shows the new server. However, when running puppet agent -t on the new client node I get the following output :

Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 500 on SERVER: Server Error: Failed to find via exec: Execution of '/etc/puppetlabs/puppet/node.rb' returned 1:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node Failed to find via exec: Execution of '/etc/puppetlabs/puppet/node.rb' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

When I run the command on the puppet master I get the following :

# /etc/puppetlabs/puppet/node.rb
No such file or directory @ rb_file_s_stat - /opt/puppetlabs/puppet/cache/yaml/facts/

In the past it all worked well and the new hosts did show up in Foreman in the environment where they were supposed to show up...

I did check the permissions on /opt/puppetlabs/puppet/cache/yaml/facts and those seem to be correct, owned by puppet with directory permissions of 750

It feels like the creation of the new host is failing and I have no clue why. So... any help is appreciated.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by 2Wheels
close date 2016-12-08 04:43:22.998314

1 Answer

Sort by ยป oldest newest most voted

answered 2016-12-08 02:45:51 -0500

domcleal gravatar image

Check /opt/puppetlabs/server/data/puppetserver/yaml/facts/ and see if the YAML file for that host is being written there instead. If so, you're using a newer version of Puppet Server with a separate vardir.

You will then need to edit /etc/puppetlabs/puppet/foreman.yaml and update :puppetdir:

:puppetdir: "/opt/puppetlabs/server/data/puppetserver"

Newer versions of Foreman's installer default to this configuration too, I'd suggest ensuring that's on the latest release too when using the latest version of Puppet.

edit flag offensive delete link more


This indeed does the trick. I changed the puppetdir as suggested in the foreman.yaml and now the puppet agent -t works like a charm.

2Wheels gravatar image2Wheels ( 2016-12-08 04:42:51 -0500 )edit

Question Tools



Asked: 2016-12-07 14:15:35 -0500

Seen: 1,211 times

Last updated: Dec 08 '16