rackslab / Slurm-web

Open source web dashboard for Slurm HPC clusters
https://slurm-web.com
GNU General Public License v3.0
340 stars 97 forks source link

JSONDecodeError with slurmrestd due to accounting error #333

Closed rezib closed 3 months ago

rezib commented 3 months ago

After many agonizing hours, I finally managed to upgrade slurm (I'm new to slurm). When running sinfo -V, I get that my version now is 23.11.8, which should work according to what you have told me. I now try to access the ui and i get the following error:

Thread-196 (process_request_thread): [INFO] 127.0.0.1 - - [12/Aug/2024 13:18:53] "GET /v3.1.0/stats HTTP/1.1" 500 -
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    return self.scan_once(s, idx=_w(s, idx).end())
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 525, in loads
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
    result = response.json()
  File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 51, in slurmrest
    items = func(*args)
  File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 76, in filter_fields
    return func(*args)
  File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 88, in _cached_data
    return _cached_data(
  File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 101, in _cached_jobs
    for job in _cached_jobs():
  File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 236, in stats
    return view(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/rfl/web/tokens.py", line 93, in wrapped
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1499, in dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1515, in full_dispatch_request
    response = self.full_dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 2070, in wsgi_app

I tried running the commands you supplied to me earlier in our discussion, nothing seems to have been changed. Do you have any idea why this may happen?

Originally posted by @Talavig in https://github.com/rackslab/Slurm-web/discussions/315#discussioncomment-10314961