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

view job Server error: The server encountered #341

Closed satishdotpatel closed 2 months ago

satishdotpatel commented 3 months ago

I have configured slurm-web using official guide and I can able to see GUI interface and my cluster information. But when I click on running job > view job then It encounter with errors. In my slurm cluster I didn't configured accounting (its disabled). Do you think its because of account is not enabled?

following error I am seeing in agent logs when I click on view job.

Aug 24 05:12:30 slurm-web slurm-web-agent[4006]: simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Aug 24 05:12:30 slurm-web slurm-web-agent[4006]: Thread-98 (process_request_thread): [INFO] 127.0.0.1 - - [24/Aug/2024 05:12:30] "GET /v3.1.0/job/122 HTTP/1.1" 500 -
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]: Thread-99 (process_request_thread): [DEBUG] Connecting to unix socket /mnt/slurmrestd.socket
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]: Thread-99 (process_request_thread): [ERROR] Exception on /v3.1.0/job/122 [GET]
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]: Traceback (most recent call last):
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 2070, in wsgi_app
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     response = self.full_dispatch_request()
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1515, in full_dispatch_request
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     rv = self.handle_user_exception(e)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1513, in full_dispatch_request
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     rv = self.dispatch_request()
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/flask/app.py", line 1499, in dispatch_request
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/rfl/web/tokens.py", line 93, in wrapped
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return view(*args, **kwargs)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 261, in job
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return jsonify(_cached_job(job))
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 155, in _cached_job
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return _cached_data(
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 88, in _cached_data
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return func(*args)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 114, in _get_job
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     result = filter_fields(
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 76, in filter_fields
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     items = func(*args)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/slurmweb/views/agent.py", line 51, in slurmrest
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     result = response.json()
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return complexjson.loads(self.text, **kwargs)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 525, in loads
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return _default_decoder.decode(s)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     obj, end = self.raw_decode(s)
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:   File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]:     return self.scan_once(s, idx=_w(s, idx).end())
Aug 24 05:12:37 slurm-web slurm-web-agent[4006]: simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
rezib commented 3 months ago

@satishdotpatel yes, accounting is required for Slurm-web. I should probably mention this more clearly in documentation.

rezib commented 2 months ago

@satishdotpatel I fixed this issue with 9efea58 which adds a clarification in the quickstart guide.