Hammer commands fails with error "Could not load the API description from the server - is the server down?"

Solution Verified - Updated -

Issue

  • Hammer commands fails with error "Could not load the API description from the server - is the server down?"

    [root@satellite ~]# hammer -h
    Could not load the API description from the server
    - 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_csv
    Could not load the API description from the server
    - 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
    - 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
    - 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_docker
    Could not load the API description from the server
    - 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
    - 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
    Usage:
    hammer [OPTIONS] SUBCOMMAND [ARG] ...
    
    [root@satellite ~]# hammer -d ping
    [ INFO 2020-12-08T14:52:46 Init] Initialization of Hammer CLI (2.1.2) has started...
    [DEBUG 2020-12-08T14:52:46 Init] Running at ruby 2.5.5-p157
    ...
    [ INFO 2020-12-08T14:52:47 API] GET /apidoc/v2.en.json
    [DEBUG 2020-12-08T14:52:47 API] Params: {}
    [DEBUG 2020-12-08T14:52:47 API] Headers: {
    :accept => "application/json",
    :params => {}
    }
    [ERROR 2020-12-08T14:52:47 API] 404 Not Found
    [DEBUG 2020-12-08T14:52:47 API] Cache expired. (default -> bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f)
    [ INFO 2020-12-08T14:52:47 API] Server: https://satellite.example.com/
    [ INFO 2020-12-08T14:52:47 API] GET /apidoc/v2.json
    [DEBUG 2020-12-08T14:52:47 API] Params: {}
    [DEBUG 2020-12-08T14:52:47 API] Headers: {
    :accept => "application/json",
    :params => {}
    }
    [ERROR 2020-12-08T14:52:47 API] 404 Not Found
    [DEBUG 2020-12-08T14:52:47 API] ""
    [DEBUG 2020-12-08T14:52:47 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_apipie_docloading_error
    [ERROR 2020-12-08T14:52:47 Exception] Could not load the API description from the server:
    404 Not Found
    - is the server down?
    - was 'foreman-rake apipie:cache' run on the server when using apipie cache? (typical production settings)
    [ WARN 2020-12-08T14:52:47 HammerCLI::Output::Output] Required adapter '' was not found, using 'base' instead
    Could not load the API description from the server:
    

Environment

  • Red Hat Satellite 6.x
  • Hammer CLI

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In