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 on slurmrestd 404 #321

Closed rezib closed 4 months ago

rezib commented 4 months ago

Error reported by user on Slurm-web Matrix channel:

Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: uWSGIWorker4Core0: [DEBUG] Found the following roles for user admin (∅) [admins, trust admins]: {anonymous [ members: None, actions: {'view-jobs', 'view-stats', 'view-nodes'} ], user [ members: {'ALL'}, actions: {'view-jobs', 'view-qos', 'view-partitions', 'view-accounts', 'view-reservations', 'view-stats', 'view-nodes'} ]}
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: uWSGIWorker4Core0: [DEBUG] Token for user admin (∅) [admins, trust admins] is permitted to perform action view-qos
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: uWSGIWorker4Core0: [DEBUG] Connecting to unix socket /run/slurmrestd/slurmrestd.socket
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: uWSGIWorker4Core0: [DEBUG] http://localhost:None "GET ///slurmdb/v0.0.39/qos HTTP/1.1" 404 69
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: [2024-07-18 10:57:47,095] ERROR in app: Exception on /v3.1.0/qos [GET]
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: Traceback (most recent call last):
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1982, in wsgi_app
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: response = self.full_dispatch_request()
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1614, in full_dispatch_request
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: rv = self.handle_user_exception(e)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1517, in handle_user_exception
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: reraise(exc_type, exc_value, tb)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/_[compat.py](http://compat.py/)", line 33, in reraise
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: raise value
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1612, in full_dispatch_request
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: rv = self.dispatch_request()
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1598, in dispatch_request
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return self.view_functions[rule.endpoint](https://app.element.io/**req.view_args)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/rfl/web/[tokens.py](http://tokens.py/)", line 93, in wrapped
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return view(*args, **kwargs)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 281, in qos
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return jsonify(_cached_qos())
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 204, in _cached_qos
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: "qos",
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 88, in _cached_data
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return func(*args)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 76, in filter_fields
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: items = func(*args)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 51, in slurmrest
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: result = response.json()
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/requests/[models.py](http://models.py/)", line 897, in json
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return complexjson.loads(self.text, **kwargs)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib64/python3.6/json/init.py", line 354, in loads
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return _default_decoder.decode(s)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib64/python3.6/json/[decoder.py](http://decoder.py/)", line 339, in decode
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib64/python3.6/json/[decoder.py](http://decoder.py/)", line 357, in raw_decode
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: raise JSONDecodeError("Expecting value", s, err.value) from None
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: Traceback (most recent call last):
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1982, in wsgi_app
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: response = self.full_dispatch_request()
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1614, in full_dispatch_request
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: rv = self.handle_user_exception(e)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1517, in handle_user_exception
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: reraise(exc_type, exc_value, tb)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/_[compat.py](http://compat.py/)", line 33, in reraise
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: raise value
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1612, in full_dispatch_request
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: rv = self.dispatch_request()
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1598, in dispatch_request
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return self.view_functions[rule.endpoint](https://app.element.io/**req.view_args)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/rfl/web/[tokens.py](http://tokens.py/)", line 93, in wrapped
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return view(*args, **kwargs)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 281, in qos
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return jsonify(_cached_qos())
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 204, in _cached_qos
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: "qos",
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 88, in _cached_data
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return func(*args)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 76, in filter_fields
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: items = func(*args)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/views/[agent.py](http://agent.py/)", line 51, in slurmrest
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: result = response.json()
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/requests/[models.py](http://models.py/)", line 897, in json
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return complexjson.loads(self.text, **kwargs)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib64/python3.6/json/init.py", line 354, in loads
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return _default_decoder.decode(s)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib64/python3.6/json/[decoder.py](http://decoder.py/)", line 339, in decode
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib64/python3.6/json/[decoder.py](http://decoder.py/)", line 357, in raw_decode
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: raise JSONDecodeError("Expecting value", s, err.value) from None
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: During handling of the above exception, another exception occurred:
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: Traceback (most recent call last):
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1997, in call
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return self.wsgi_app(environ, start_response)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1985, in wsgi_app
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: response = self.handle_exception(e)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/flask/[app.py](http://app.py/)", line 1547, in handle_exception
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: return self.finalize_request(handler(e), from_error_handler=True)
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: File "/usr/lib/python3.6/site-packages/slurmweb/apps/init.py", line 101, in _handle_bad_request
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: jsonify(code=error.code, name=[error.name](http://error.name/), description=error.description),
Jul 18 10:57:47 master.omnia.cluster uwsgi[512139]: AttributeError: 'JSONDecodeError' object has no attribute 'code'