Unable to see Users managing page : Internal Error (Invalid syntax..)

Hello.

I’m currently using last version 2.0.0.p15 of Raw Edition for Ubuntu 20.04 running on Windows10 and I’m experiencing this strange crit error making me unable to manage Users settings:

"Internal error: (‘invalid syntax’, (’’, 1, 1, ‘<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n’))

An internal error occured while processing your request. You can report this issue to the Checkmk team to help fixing this issue. Please open the crash report page and use the form for reporting the problem."

I’ve already stopped and reloaded the instances, upgraded from v2.0.0p14 to v2.0.0p15 but the issue remains.

Any suggestion?

Thx in advance,

Psycho

Hello @Psycho and welcome to the community! Did you use the crash report page? Because that is how you can provide us valuable information on the issue.

1 Like

Hello Robin!

Sorry for the late reply.
Unfortunately I’m working on a system for a client and I cannot share sensitive infos about the CheckMk.
By the way it seems my system has few more problems so I’m building up a new one from scratch.

Thank you again and have a good day!

Psycho :male_detective:

Fair enough. Good luck and take care!

1 Like

Hello Robin,

I have the same error when opening the users.

SyntaxError ((‘invalid syntax’, (’’, 1, 1, ‘<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n’)))

Crash report I have just sent you.

Ubuntu 18.04.6 LTS, 2.0.0p17 cre

Greetings
Fabian

Hi @fabian.kroeger, does this also happen on a new and fresh site?

No, it works on a new site. When I restore my backup on a new site, it doesn’t work again.

Okay, that describes the problem quite well, but unfortunately I do not have a lead on this without troubleshooting. Maybe someone else has an idea.

Hi @fabian.kroeger,

can you post the crash report here with sensible data censored? I guess there is a call to some endpoint which generates an error messages as web page, this is where the xml message comes from. A stack trace from the crash report and some local variable could help to determine the coding section and see what my goes wrong there.

{"time": 1643125196.0587938, "os": "Ubuntu 18.04.6 LTS", "version": "2.0.0p18", "edition": "cre", "core": "nagios", "python_version": "3.8.7 (default, Feb  3 2021, 02:50:03) \n[GCC 10.1.0]", "python_paths": ["\/omd\/sites\/monitoring\/local\/lib\/python3", "\/omd\/sites\/monitoring\/lib\/python38.zip", "\/omd\/sites\/monitoring\/lib\/python3.8", "\/omd\/sites\/monitoring\/lib\/python3.8\/lib-dynload", "\/omd\/sites\/monitoring\/lib\/python3.8\/site-packages", "\/omd\/sites\/monitoring\/lib\/python3"], "id": "0c0845f4-7df5-11ec-8960-000c29e52fe4", "crash_type": "gui", "exc_type": "SyntaxError", "exc_value": "('invalid syntax', ('<unknown>', 1, 1, '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\\n'))", "exc_traceback": [["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/wsgi\/applications\/checkmk.py", 165, "_process_request", "response = page_handler()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/wsgi\/applications\/utils.py", 59, "_call_auth", "func()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/pages.py", 186, "<lambda>", "return (lambda hc: lambda: hc().handle_page())(handle_class)"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/pages.py", 48, "handle_page", "self.page()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/pages.py", 158, "<lambda>", "\"page\": lambda self: self._wrapped_callable[0]()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/wato\/page_handler.py", 92, "page_handler", "_wato_page_handler(current_mode, mode_permissions, mode_class)"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/wato\/page_handler.py", 101, "_wato_page_handler", "mode = mode_class()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/wato\/pages\/users.py", 95, "__init__", "self._job_snapshot = userdb.UserSyncBackgroundJob().get_status_snapshot()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/gui_background_job.py", 210, "get_status_snapshot", "return GUIBackgroundStatusSnapshot(self)"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/gui_background_job.py", 250, "__init__", "self._job_status = job.get_status()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/background_job.py", 430, "get_status", "status = self._jobstatus.get_status_from_file()"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/gui\/background_job.py", 558, "get_status_from_file", "data = store.load_object_from_file(str(self._jobstatus_path), default={}, lock=True)"], ["\/omd\/sites\/monitoring\/lib\/python3\/cmk\/utils\/store.py", 204, "load_object_from_file", "return ast.literal_eval(content)"], ["\/omd\/sites\/monitoring\/lib\/python3.8\/ast.py", 59, "literal_eval", "node_or_string = parse(node_or_string, mode='eval')"], ["\/omd\/sites\/monitoring\/lib\/python3.8\/ast.py", 47, "parse", "return compile(source, filename, mode, flags,"]], "local_vars": "eydmZWF0dXJlX3ZlcnNpb24nOiAtMSwKICdmaWxlbmFtZSc6ICc8dW5rbm93bj4nLAogJ2ZsYWdzJzogMTAyNCwKICdtb2RlJzogJ2V2YWwnLAogJ3NvdXJjZSc6ICc8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCIgc3RhbmRhbG9uZT0ieWVzIj8+XG4nCiAgICAgICAgICAgJzxOQUdJT1M+XG4nCiAgICAgICAgICAgJyAgPERBVEFTT1VSQ0U+XG4nCiAgICAgICAgICAgJyAgICA8VEVNUExBVEU+Y2hlY2tfbWsta2VybmVsPC9URU1QTEFURT5cbicKICAgICAgICAgICAnICAgICcKICAgICAgICAgICAnPFJSREZJTEU+L29tZC9zaXRlcy9tb25pdG9yaW5nL3Zhci9wbnA0bmFnaW9zL3BlcmZkYXRhL0ZLLUJJVFdBUkRFTi0xL0tlcm5lbF9NYWpvcl9QYWdlX0ZhdWx0c19wZ21hamZhdWx0LnJyZDwvUlJERklMRT5cbicKICAgICAgICAgICAnICAgIDxSUkRfU1RPUkFHRV9UWVBFPk1VTFRJUExFPC9SUkRfU1RPUkFHRV9UWVBFPlxuJwogICAgICAgICAgICcgICAgPFJSRF9IRUFSVEJFQVQ+ODQ2MDwvUlJEX0hFQVJUQkVBVD5cbicKICAgICAgICAgICAnICAgJywKICd0eXBlX2NvbW1lbnRzJzogRmFsc2V9", "details": {"page": "wato.py", "vars": {"mode": "users"}, "username": null, "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko\/20100101 Firefox\/96.0", "referer": "https:\/\/checkmk.xxxxxxx.com\/monitoring\/check_mk\/index.py?start_url=%2Fmonitoring%2Fcheck_mk%2Fdashboard.py", "is_mobile": false, "is_ssl_request": true, "language": "de", "request_method": "GET"}}
1 Like

Do you have LDAP user management enabled? At the stack trace i see the background job invoked, this could be from a ldap sync which produces errors.
Can you also check the web.log, this could give some further informations.

No, we use only local users.


2022-01-25 17:39:46,673 [40] [cmk.web 89239] https://XXX.XXX.XXX.XXX/monitoring/check_mk/wato.py/monitoring/check_mk/wato.py?mode=users Unhandled exception (Crash-ID: 68000074-7dfd-11ec-8960-000c29e52fe4)
Traceback (most recent call last):
  File "/omd/sites/monitoring/lib/python3/cmk/gui/wsgi/applications/checkmk.py", line 165, in _process_request
    response = page_handler()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/wsgi/applications/utils.py", line 59, in _call_auth
    func()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/pages.py", line 186, in <lambda>
    return (lambda hc: lambda: hc().handle_page())(handle_class)
  File "/omd/sites/monitoring/lib/python3/cmk/gui/pages.py", line 48, in handle_page
    self.page()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/pages.py", line 158, in <lambda>
    "page": lambda self: self._wrapped_callable[0]()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/wato/page_handler.py", line 92, in page_handler
    _wato_page_handler(current_mode, mode_permissions, mode_class)
  File "/omd/sites/monitoring/lib/python3/cmk/gui/wato/page_handler.py", line 101, in _wato_page_handler
    mode = mode_class()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/wato/pages/users.py", line 95, in __init__
    self._job_snapshot = userdb.UserSyncBackgroundJob().get_status_snapshot()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/gui_background_job.py", line 210, in get_status_snapshot
    return GUIBackgroundStatusSnapshot(self)
  File "/omd/sites/monitoring/lib/python3/cmk/gui/gui_background_job.py", line 250, in __init__
    self._job_status = job.get_status()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/background_job.py", line 430, in get_status
    status = self._jobstatus.get_status_from_file()
  File "/omd/sites/monitoring/lib/python3/cmk/gui/background_job.py", line 558, in get_status_from_file
    data = store.load_object_from_file(str(self._jobstatus_path), default={}, lock=True)
  File "/omd/sites/monitoring/lib/python3/cmk/utils/store.py", line 204, in load_object_from_file
    return ast.literal_eval(content)
  File "/omd/sites/monitoring/lib/python3.8/ast.py", line 59, in literal_eval
    node_or_string = parse(node_or_string, mode='eval')
  File "/omd/sites/monitoring/lib/python3.8/ast.py", line 47, in parse
    return compile(source, filename, mode, flags,
  File "<unknown>", line 1
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    ^
SyntaxError: invalid syntax

This makes me curious if you have multisite active?

Otherwise it’s may the problem with renaming sites and omd does not convert anything accordingly. Have you renamed your site at the restore?

Nah, we only have one site active.

I have never renamed the OMD. Should I rename them when I restore them?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.