"hammer ping" command on the Satellite Server fails with the following error - Could not load the API description from the server: Server broke connection - is the server down?

Solution Verified - Updated

Environment

  • Red Hat Satellite 6

Issue

  • Why does the hammer ping command fail with the following error on Red Hat Satellite -

       # hammer ping
    Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_foreman.
       Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_foreman_ansible.
       Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_foreman_bootdisk.
    Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_foreman_openscap.
    Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
       Warning: An error occured while loading module hammer_cli_foreman_remote_execution.
    Warning: An error occured while loading module hammer_cli_foreman_tasks.
    Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_foreman_templates.
    Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_foreman_virt_who_configure.
    Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_foreman_webhooks.
    Could not load the API description from the server:
    Server broke connection
      - is the server down?
      - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    Warning: An error occured while loading module hammer_cli_katello.
    Error: No such sub-command 'ping'.
    See: 'hammer --help'.   
    

Resolution

  • Unset the http_proxy, https_proxy, and no_proxy environment variable using the following command on the Satellite Server's CLI -

    # unset http_proxy
    # unset https_proxy
    # unset no_proxy
    
  • Re-execute the hammer ping command on the Satellite Server's CLI as follows -

    # hammer ping
    

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

Root Cause

  • Presence of https_proxy environment variable on the Satellite Server, which is not recommended.

Note: Please refer the following KCS article to know the exact details about - How to configure Red Hat Satellite 6 with proxy server between the Satellite server and the Internet?

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.