Skip to content

Error 500 upon multiple imports from LibreNMS #410

Open

Description

@edaleand

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.

Activity

  1. afourmy commented on Jan 31, 2024

    @afourmy
    Member

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

  2. edaleand commented on Jan 31, 2024

    @edaleand
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions