Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Danny
MVP Platinum
MVP Platinum

Gaia API access for Maestro/ElasticXL from SmartConsole CLI

I'd like to access my Maestro/ElasticXL systems via SmartConsole CLI.
When I try to access an API that is not listed for Maestro/ElasticXL, the following error is shown:

gaia-api/show-hostname target "10.10.0.1" --format json
{
   "code" : "err_gaia_api_login_failed",
   "message" : "Cannot login to the Gateway: 10.10.0.1"
}


When I try to access an API that is listed for Maestro/ElasticXL, the following error is shown:

gaia-api/show-maestro-gateway target "10.10.0.1" --format json
{
   "code" : "err_gaia_api_send_command_failed",
   "message" : "Cannot send the command to the gateway: 10.10.0.1 "
}


Of course, Gaia API access was enabled for user 'admin' on Maestro.
I'm also using 'admin' with SuperUser permissions in SmartConsole.

Any ideas?

0 Kudos
1 Reply
Bob_Zimmerman
MVP Gold
MVP Gold

Well, on my R82 VSNext cluster, it seems the Gaia API is just broken:

[Expert@DallasSC]# mgmt_cli -f json -r true gaia-api/show-hostname target a9cf9cc1-ba92-4dc4-8d4f-14fc70facf1f
{
  "code" : "err_gaia_api_login_failed",
  "message" : "Cannot login to the Gateway: a9cf9cc1-ba92-4dc4-8d4f-14fc70facf1f"
}
[Expert@DallasticXL-s01-01:0]# tail -f /var/log/gaia_api_server.log
23/03/26 18:21:44: Thread-1 (socketListener): server_util.udsListener: INFO: Internal request for 'login'
23/03/26 18:21:44: Thread-1 (socketListener): objects.sessions: INFO: Remote authentication succeed for user:admin
23/03/26 18:21:44: Thread-1 (socketListener): server_util.udsListener: INFO: Local login for user 'admin' SUCCEEDED
23/03/26 18:21:45: MainThread: server_util.udsListener: INFO: remote_addr IP = 10.0.1.251
23/03/26 18:21:45: MainThread: infra.urlGeneratorIS: INFO: Handle request: <class 'requests.hostname.ShowHostNameRequest'>
23/03/26 18:21:45: MainThread: infra.urlGeneratorIS: INFO: Execute validators
23/03/26 18:21:45: MainThread: infra.urlGeneratorIS: INFO: Verify permissions
23/03/26 18:21:45: MainThread: clish: ERROR: Error running clish command '"show hostname"', error: ''
23/03/26 18:21:45: MainThread: infra.pipeline: ERROR: Failed to handle request, reason: 'Error running clish command '"show hostname"''
23/03/26 18:21:45: MainThread: infra.pipeline: ERROR: Error running clish command '"show hostname"'
Traceback (most recent call last):
  File "/rest_api/ckp/infra/urlGeneratorIS.py", line 68, in actor
    res = execute(inst, requestData)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/rest_api/ckp/infra/pipeline.py", line 271, in execute
    ret = inst.Handler_RESPONSE().serialize()
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/rest_api/ckp/objects/hostname.py", line 14, in __init__
    self.populate()
  File "/rest_api/ckp/objects/hostname.py", line 23, in populate
    self.setHostname(clish.runClish("show hostname", lock).strip())
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/rest_api/libs/clish.py", line 181, in runClish
    raise runClishException("Error running clish command '{}'".format(cmd),output)
clish.runClishException: Error running clish command '"show hostname"'
23/03/26 18:21:45: MainThread: server_util.udsListener: INFO: Request for endpoint /show-hostname [method: POST], for source 10.0.1.251, FAILED [duration 338ms]
23/03/26 18:21:49: Thread-1 (socketListener): server_util.udsListener: INFO: Internal request for 'login'
23/03/26 18:21:49: Thread-1 (socketListener): objects.sessions: INFO: Remote authentication succeed for user:admin
23/03/26 18:21:49: Thread-1 (socketListener): server_util.udsListener: INFO: Local login for user 'admin' SUCCEEDED
23/03/26 18:21:49: MainThread: server_util.udsListener: INFO: remote_addr IP = 10.0.1.251
23/03/26 18:21:49: MainThread: infra.urlGeneratorIS: INFO: Handle request: <class 'requests.hostname.ShowHostNameRequest'>
23/03/26 18:21:49: MainThread: infra.urlGeneratorIS: INFO: Execute validators
23/03/26 18:21:49: MainThread: infra.urlGeneratorIS: INFO: Verify permissions
23/03/26 18:21:49: MainThread: clish: ERROR: Error running clish command '"show hostname"', error: ''
23/03/26 18:21:49: MainThread: infra.pipeline: ERROR: Failed to handle request, reason: 'Error running clish command '"show hostname"''
23/03/26 18:21:49: MainThread: infra.pipeline: ERROR: Error running clish command '"show hostname"'
Traceback (most recent call last):
  File "/rest_api/ckp/infra/urlGeneratorIS.py", line 68, in actor
    res = execute(inst, requestData)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/rest_api/ckp/infra/pipeline.py", line 271, in execute
    ret = inst.Handler_RESPONSE().serialize()
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/rest_api/ckp/objects/hostname.py", line 14, in __init__
    self.populate()
  File "/rest_api/ckp/objects/hostname.py", line 23, in populate
    self.setHostname(clish.runClish("show hostname", lock).strip())
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/rest_api/libs/clish.py", line 181, in runClish
    raise runClishException("Error running clish command '{}'".format(cmd),output)
clish.runClishException: Error running clish command '"show hostname"'
23/03/26 18:21:49: MainThread: server_util.udsListener: INFO: Request for endpoint /show-hostname [method: POST], for source 10.0.1.251, FAILED [duration 460ms]
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events