Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 upon multiple imports from LibreNMS #410

Open
edaleand opened this issue Jan 30, 2024 · 2 comments
Open

Error 500 upon multiple imports from LibreNMS #410

edaleand opened this issue Jan 30, 2024 · 2 comments

Comments

@edaleand
Copy link

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.

image

Not sure how to troubleshoot this. Help appreciated.

@afourmy
Copy link
Member

afourmy commented Jan 31, 2024

there should be a stacktrace in the server logs to troubleshoot it.

@edaleand
Copy link
Author

Thank you for swift reply.

/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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants