[slurm-users] Slurm Rest API error

Brian Andrus toomuchit at gmail.com
Wed Jun 28 19:00:41 UTC 2023


Vlad,

Actually, it looks like it is working. You are using v0.39 for the 
parser, which is trying to use OpenAPI calls. Unless you compiled with 
OpenAPI, that won't work.

Try using the 0.37 version and you may see a simpler result that is 
successful.

Brian Andrus

On 6/28/2023 11:05 AM, Ozeryan, Vladimir wrote:
>
> Hello everyone,
>
> I am trying to get access to Slurm REST API working.
>
> JWT configured and token generated. All daemons are configured and 
> running “slurmdbd, slurmctld and slurmrestd”. I can successfully get 
> to Slurm API with “slurm” user but that’s it.
>
> *bash-4.2$ echo -e "GET /slurm/v0.0.39/jobs HTTP/1.1\r\nAccept: 
> */*\r\n" | slurmrestd* – That works.
>
> But as my user I get the following error:
>
> [user at sched01 slurm-23.02.3]$ curl localhost:6820/slurm/v0.0.39/diag 
> --header "X-SLURM-USER-NAME: $USER" --header "X-SLURM-USER-TOKEN: 
> $SLURM_JWT”
>
> HTTP/1.1 500 INTERNAL ERROR
>
> Connection: Close
>
> Content-Length: 833
>
> Content-Type: application/json
>
> {
>
>    "meta": {
>
>      "plugin": {
>
>        "type": "openapi\/v0.0.39",
>
>        "name": "Slurm OpenAPI v0.0.39",
>
>        "data_parser": "v0.0.39"
>
>      },
>
>      "client": {
>
>        "source": "[localhost]:55960"
>
>      },
>
>      "Slurm": {
>
>        "version": {
>
>          "major": 23,
>
>          "micro": 3,
>
>          "minor": 2
>
>        },
>
>        "release": "23.02.3"
>
>      }
>
>    },
>
>    "errors": [
>
>      {
>
>        "description": "openapi_get_db_conn() failed to open slurmdb 
> connection",
>
>        "error_number": 7000,
>
>        "error": "Unable to connect to database",
>
>        "source": "init_connection"
>
>      },
>
>      {
>
>        "description": "slurm_get_statistics() failed to get slurmctld 
> statistics",
>
>        "error_number": -1,
>
>        "error": "Unspecified error",
>
>        "source": "_op_handler_diag"
>
>      }
>
>    ],
>
>    "warnings": [
>
>    ],
>
>    "statistics": null
>
> Thank you,
>
> Vlad Ozeryan
>
> AMDS – AB1 Linux-Support
>
> Vladimir.Ozeryan at jhuapl.edu
>
> Ext. 23966
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20230628/163191d0/attachment.htm>


More information about the slurm-users mailing list