Ask Your Question

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

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

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 -0600

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 -0600 )edit

Another reason which caused that error on my side was permission rights for specific "puppet" user against "/opt/puppetlabs/server/data/puppetserver" . So that I setup sudo chown -R puppet:puppet /opt/puppetlabs/server/data/puppetserver and it has been sorted. This was after upgrade to 5.3.6 server

Goran40 gravatar imageGoran40 ( 2018-12-13 06:25:04 -0600 )edit

Question Tools



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

Seen: 8,725 times

Last updated: Dec 08 '16