Hammer commands failing with SSL certificate error on Red Hat Satellite 6.

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.x

Issue

  • hammer commands are failing with the below errors:

       # hammer organization list
    
       SSL certificate verification failed.
       Make sure you configured the correct URL and have the server's CA certificate installed on your system.
    

Resolution

  • Make sure the ssl_ca_file parameter in the /etc/hammer/cli.modules.d/foreman.yml file should point to the below certificate path instead of any custom certificate:

    :ssl:
      :ssl_ca_file: '/etc/pki/katello/certs/katello-server-ca.crt'
    
  • Ensure that the /etc/hosts file contains the correct entry for the Satellite server. Verify that the IP address specified is accurate.

For more KB articles/solutions related to Red Hat Satellite 6.x hammer Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x hammer-related Issues

For more KB articles/solutions related to Red Hat Satellite 6.x SSL Certificates Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x SSL Certificates Issues

Root Cause

  • The /etc/hammer/cli.modules.d/foreman.yml file was configured to point to a puppet certificate:
 ssl_ca_file = /etc/puppetlabs/puppet/ssl/ca/ca_crt.pem  
  • An incorrect entry in the /etc/hosts file for the Satellite server can lead to this issue.

Diagnostic Steps

  • The below errors were seen when running the hammer command:

Content from satellite.example.com. is not included.https://satellite.example.com./

SBR
Product(s)
Components
Category

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.