You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error 500 upon multiple imports from LibreNMS #410
I have successfully imported the inventory library from LibreNMS. Later, when I do a another import, the dashboard returns an Error 500 Internal Server Error. The devices table is updated though, so the import was done successfully. However the dasboard no longer shows anything and the following message appears.
Not sure how to troubleshoot this. Help appreciated.
/var/log/messages produces this output. Seems to be a NoneType in there. Any idea what could have caused this on the second (and third and fourth) import?
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: [2024-01-31 09:24:32 +0100] [53258] [DEBUG] POST /count_models
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: [MainThread] 2024-01-31 09:24:32,711 root ERROR USER: - 0.008s - POST /count_models (500)
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: Traceback (most recent call last):
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/home/nep/eNMS/eNMS/server.py", line 157, in decorated_function
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: result = function(*args, **kwargs)
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/home/nep/eNMS/eNMS/server.py", line 394, in route
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: return jsonify(getattr(controller, endpoint)(*args, **kwargs))
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/home/nep/.local/lib/python3.9/site-packages/flask/json/__init__.py", line 170, in jsonify
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: return current_app.json.response(*args, **kwargs) # type: ignore[return-value]
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/home/nep/.local/lib/python3.9/site-packages/flask/json/provider.py", line 214, in response
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: f"{self.dumps(obj, **dump_args)}\n", mimetype=self.mimetype
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/home/nep/.local/lib/python3.9/site-packages/flask/json/provider.py", line 179, in dumps
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: return json.dumps(obj, **kwargs)
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/usr/lib64/python3.9/json/__init__.py", line 234, in dumps
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: return cls(
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/usr/lib64/python3.9/json/encoder.py", line 201, in encode
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: chunks = list(chunks)
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/usr/lib64/python3.9/json/encoder.py", line 431, in _iterencode
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: yield from _iterencode_dict(o, _current_indent_level)
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/usr/lib64/python3.9/json/encoder.py", line 405, in _iterencode_dict
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: yield from chunks
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/usr/lib64/python3.9/json/encoder.py", line 405, in _iterencode_dict
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: yield from chunks
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: File "/usr/lib64/python3.9/json/encoder.py", line 353, in _iterencode_dict
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: items = sorted(dct.items())
Jan 31 09:24:32 nepno-vg-enms gunicorn[53258]: TypeError: '<' not supported between instances of 'NoneType' and 'str'
Activity
afourmy commentedon Jan 31, 2024
there should be a stacktrace in the server logs to troubleshoot it.
edaleand commentedon Jan 31, 2024
Thank you for swift reply.
/var/log/messagesproduces this output. Seems to be a NoneType in there. Any idea what could have caused this on the second (and third and fourth) import?