Running Satellite OpenScap and puppet agent fails with '/usr/bin/foreman_scap_client: No such file or directory' error message
Environment
- Red Hat Enterprise Linux
- 7.5
- Red Hat Satellite
- 6.3
Issue
-
When trying to run
OpenScap, the following error message is showing up:/var/tmp/foreman-ssh-cmd-xxxxx-xxxx-xxxx-xxxx-xxxxx/script: line 1: /usr/bin/foreman_scap_client: No such file or directory -
When trying to run the
puppet agentin theslaveserver, the following error messages are showing up:# /usr/bin/puppet agent -t Warning: Unable to fetch my node definition, but the agent run will continue: Warning: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A Info: Retrieving pluginfacts Error: /File[/var/lib/puppet/facts.d]: Failed to generate additional resources using 'eval_generate': SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A Error: /File[/var/lib/puppet/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet://server.example.com/pluginfacts: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A Info: Retrieving plugin Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://server.example.com/plugins: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A Info: Loading facts Error: Could not retrieve catalog from remote server: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run Error: Could not send report: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A # /usr/bin/puppet agent --config /etc/puppet/puppet.conf --onetime --tags no_such_tag --server server.example.com --no-daemonize --verbose Info: Caching certificate for certificate.example.com Info: Caching certificate_revocation_list for ca Info: Caching certificate for certificate.example.com Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 500 on SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Stdlib::Stages] is already declared; cannot redeclare at /usr/share/puppet/modules/stdlib/manifests/init.pp:18 at /usr/share/puppet/modules/stdlib/manifests/init.pp:18:3 on node certificate.example.com","issue_kind":"RUNTIME_ERROR","stacktrace":["Warning: The 'stacktrace' property is deprecated and will be removed in a future version of Puppet. For security reasons, stacktraces are not returned with Puppet HTTP Error responses."]} Notice: Using cached catalog Error: Could not retrieve catalog; skipping run
Resolution
This issue must be solved in two steps, as follows:
-
First, to solve the
puppet agentissues, any existing certificates present in/var/lib/puppet/sslmust be deleted. After that, runpuppet agentagain:# rm -rf /var/lib/puppet/ssl/* # puppet agent -t -
Finally, to solve the
OpenScapissue, theStdlib::Stagesclass must be removed from thePuppet Classesof anyHost GrouporConfig Group. That can be accessed by the URLhttps://satelliteserver.example.com/hostgroups/hostgroupname/edit, changing only thehostgroupnamefor eachHost GrouporConfig Groupexisting in the environment or by following these steps:2.1 Access the Satellite Web GUI
2.2 Navigate toConfigure>Host groups
2.3 Select a host group
2.4 Navigate toPuppet Classes
2.5 If there is astdlib::stagesclass underIncluded Classescolumn, just click the dash (-) icon to remove it
2.6 Repeat the same steps for eachHost GrouporConfig Groupin the environment
2.7 Runpuppet agentto check if theOpenScapissue was solved:# /usr/bin/puppet agent --config /etc/puppet/puppet.conf --onetime --tags no_such_tag --server satelliteserver --no-daemonize --verbose
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
For more KB articles/solutions related to Red Hat Satellite 6.x OpenSCAP Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x OpenSCAP Issues
Root Cause
This issue is caused by errors with certificates present in the /var/lib/puppet/ssl folder and if any Stdlib::Stages class is added in Host Group or Config Group on the satellite GUI (Graphical User Interface).
Diagnostic Steps
Run puppet agent and check if there is any SSL error or Error 500:
# /usr/bin/puppet agent -t
# /usr/bin/puppet agent --config /etc/puppet/puppet.conf --onetime --tags
NOTE: Refer to the following articles to understand more about OpenScap and Satellite integration:
Installing and Configuring OpenScap on Red Hat Satellite 6.
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.