CheckMK Appliance upgrade: Syntax error in step 42

CMK version: 2.4.20
OS version: Appliance 1.7.14

Error message:

Reset deprecations scheduling" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/NanoBiophotonics/lib/python3/cmk/update_config/main.py", line 271, in update_config
-|     action(logger)
-|   File "/omd/sites/NanoBiophotonics/lib/python3/cmk/update_config/plugins/actions/deprecations.py", line 18, in __call__
-|     job_scheduler.reset_scheduling("execute_deprecation_tests_and_notify_users")
-|   File "/omd/sites/NanoBiophotonics/lib/python3/cmk/gui/job_scheduler/_scheduler.py", line 102, in reset_scheduling
-|     for ident, datetime in _load_last_job_runs().items()
-|                            ^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/NanoBiophotonics/lib/python3/cmk/gui/job_scheduler/_scheduler.py", line 83, in _load_last_job_runs
-|     for ident, ts in store.load_object_from_file(
-|                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/NanoBiophotonics/lib/python3.12/site-packages/cmk/ccc/store/__init__.py", line 210, in load_object_from_file
-|     return ObjectStore(Path(path), serializer=DimSerializer()).read_obj(default=default)
-|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/NanoBiophotonics/lib/python3.12/site-packages/cmk/ccc/store/_file.py", line 195, in read_obj
-|     return self._serializer.deserialize(raw) if raw else default
-|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/NanoBiophotonics/lib/python3.12/site-packages/cmk/ccc/store/_file.py", line 74, in deserialize
-|     return literal_eval(raw.decode("utf-8"))
-|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/NanoBiophotonics/lib/python3.12/ast.py", line 66, in literal_eval
-|     node_or_string = parse(node_or_string.lstrip(" \t"), mode='eval')
-|                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/NanoBiophotonics/lib/python3.12/ast.py", line 52, in parse
-|     return compile(source, filename, mode, flags,
-|            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-| SyntaxError: source code string cannot contain null bytes


The update of the site itself works completely fine, no problems at the end. But this syntax error is a bit confusing

The update mechanism is hitting a file containing at least one null byte. This can happen, if your server crashed or the file system filled up entirely or similar events.

Look for the relevant files in the file system and remove them, then the error should be gone.

Hi @robin.gierse

which are the relevant files? where/how do I find them?

I did an upgrade to 2.4.0p34.cre but this error is always shown since the last 3 or 4 site upgrades .. probably because of deleting background jobs (or more) suggested somewhere else.

Regards

Well, you are looking for files, which contain a null byte character (or are effetively empty). If you punch that into your favourite search engine, I am sure you will find a few options to find those files. :slight_smile: