<div dir="auto">Hi<div dir="auto"><br></div><div dir="auto">I'm also trying to use slurm rest api. I wonder if the error about slurmdbd has anything to do with it. Does slurmctld connect correctly to slurmdbd?</div><div dir="auto"><br></div><div dir="auto">Regards</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 28, 2023, 9:03 PM Brian Andrus <<a href="mailto:toomuchit@gmail.com">toomuchit@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p>Vlad,</p>
<p>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.</p>
<p>Try using the 0.37 version and you may see a simpler result that
is successful.</p>
<p>Brian Andrus<br>
</p>
<div>On 6/28/2023 11:05 AM, Ozeryan,
Vladimir wrote:<br>
</div>
<blockquote type="cite">
<div>
<p class="MsoNormal">Hello everyone,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I am trying to get access to Slurm REST API
working. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><b>bash-4.2$ echo -e "GET
/slurm/v0.0.39/jobs HTTP/1.1\r\nAccept: */*\r\n" |
slurmrestd</b> – That works.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">But as my user I get the following error:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[user@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”<u></u><u></u></p>
<p class="MsoNormal">HTTP/1.1 500 INTERNAL ERROR<u></u><u></u></p>
<p class="MsoNormal">Connection: Close<u></u><u></u></p>
<p class="MsoNormal">Content-Length: 833<u></u><u></u></p>
<p class="MsoNormal">Content-Type: application/json<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">{<u></u><u></u></p>
<p class="MsoNormal"> "meta": {<u></u><u></u></p>
<p class="MsoNormal"> "plugin": {<u></u><u></u></p>
<p class="MsoNormal"> "type": "openapi\/v0.0.39",<u></u><u></u></p>
<p class="MsoNormal"> "name": "Slurm OpenAPI v0.0.39",<u></u><u></u></p>
<p class="MsoNormal"> "data_parser": "v0.0.39"<u></u><u></u></p>
<p class="MsoNormal"> },<u></u><u></u></p>
<p class="MsoNormal"> "client": {<u></u><u></u></p>
<p class="MsoNormal"> "source": "[localhost]:55960"<u></u><u></u></p>
<p class="MsoNormal"> },<u></u><u></u></p>
<p class="MsoNormal"> "Slurm": {<u></u><u></u></p>
<p class="MsoNormal"> "version": {<u></u><u></u></p>
<p class="MsoNormal"> "major": 23,<u></u><u></u></p>
<p class="MsoNormal"> "micro": 3,<u></u><u></u></p>
<p class="MsoNormal"> "minor": 2<u></u><u></u></p>
<p class="MsoNormal"> },<u></u><u></u></p>
<p class="MsoNormal"> "release": "23.02.3"<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"> },<u></u><u></u></p>
<p class="MsoNormal"> "errors": [<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> "description":
"openapi_get_db_conn() failed to open slurmdb connection",<u></u><u></u></p>
<p class="MsoNormal"> "error_number": 7000,<u></u><u></u></p>
<p class="MsoNormal"> "error": "Unable to connect to
database",<u></u><u></u></p>
<p class="MsoNormal"> "source": "init_connection"<u></u><u></u></p>
<p class="MsoNormal"> },<u></u><u></u></p>
<p class="MsoNormal"> {<u></u><u></u></p>
<p class="MsoNormal"> "description":
"slurm_get_statistics() failed to get slurmctld statistics",<u></u><u></u></p>
<p class="MsoNormal"> "error_number": -1,<u></u><u></u></p>
<p class="MsoNormal"> "error": "Unspecified error",<u></u><u></u></p>
<p class="MsoNormal"> "source": "_op_handler_diag"<u></u><u></u></p>
<p class="MsoNormal"> }<u></u><u></u></p>
<p class="MsoNormal"> ],<u></u><u></u></p>
<p class="MsoNormal"> "warnings": [<u></u><u></u></p>
<p class="MsoNormal"> ],<u></u><u></u></p>
<p class="MsoNormal"> "statistics": null<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Vlad Ozeryan <u></u><u></u></p>
<p class="MsoNormal">AMDS – AB1 Linux-Support<u></u><u></u></p>
<p class="MsoNormal"><a href="mailto:Vladimir.Ozeryan@jhuapl.edu" target="_blank" rel="noreferrer">Vladimir.Ozeryan@jhuapl.edu</a><u></u><u></u></p>
<p class="MsoNormal">Ext. 23966<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</blockquote>
</div>
</blockquote></div>