Puppet fails with Error 500 on SERVER: Server Error: Failed when searching for node client.example.com
Environment
- Red Hat Satellite 6.x
- Red Hat Enterprise Linux
Issue
# puppet agent -tfails with:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node client.example.com: Failed to find client.example.com via exec: Execution of '/etc/puppetlabs/puppet/node.rb client.example.com' returned 1
Resolution
- Check the entries for
ssl_ca,ssl_cert,ssl_keyin/etc/puppetlabs/puppet/foreman.yamlon the satellite server. The file should have entries as:
---
:url: "https://satellite.example.com"
:ssl_ca: "/etc/pki/katello/puppet/puppet_client_ca.crt"
:ssl_cert: "/etc/pki/katello/puppet/puppet_client.crt"
:ssl_key: "/etc/pki/katello/puppet/puppet_client.key"
:user: ""
:password: ""
:puppetdir: "/opt/puppetlabs/server/data/puppetserver"
:puppetuser: "puppet"
:facts: true
:timeout: 60
:report_timeout: 60
:threads: null
-
Restart the katello service after making correct entries:
# katello-service restart -
Regenerate puppet certs and sign them:
On the client run# puppet agent -tv. -
The issue can also be due to incorrect
Host Group ParameterorHost Parametersset on the client.
Login to satelliteweb ui>Hosts>All Hosts> search and click on the client host >Edit>Parameterstab:
Delete theHost Group ParameterorHost Parametersset.
For more KB articles/solutions related to Red Hat Satellite 6.x Puppet Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Puppet Issues
Root Cause
/etc/puppetlabs/puppet/foreman.yamlhad incorrect entries forssl_ca,ssl_cert,ssl_key.- Incorrect
Host Group ParameterorHost Parametersset on the client.
Diagnostic Steps
# puppet agent -ton client fails with:
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 500 on SERVER: Server Error: Failed to find client.example.com via exec: Execution of '/etc/puppetlabs/puppet/node.rb client.example.com' returned 1:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node client.example.com: Failed to find client.example.com via exec: Execution of '/etc/puppetlabs/puppet/node.rb client.example.com' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments