Agent Bakery crashes

CMK version: 2.4.0p7
OS version: Centos 9

I want to update from version 2.4.0p1 to 2.4.0p7.
In version 2.4.0p1 the bakery runs without any error.

I tryed to update to 2.4.0p6. Here i had also error-messages in the bakery.

Error message:

Exception (Crash ID: 75a20c60-5be7-11f0-bc6b-0050569427da): Error running automation call bake-agents (exit code 2), error:
[Errno 2] No such file or directory: ‘/omd/sites/lra/var/check_mk/agents/linux_rpm/packages/53e9f43bc9a388eb’

Weitere Informationen befinden sich in ~/var/log/web.log

Agent baking and signing for all hosts started…
2025-07-08 12:36:51,756 [40] [cmk.web.automations 1320667] Error running “{‘command’: ‘bake-agents’, ‘args’: }” (exit code 2)
2025-07-08 12:36:51,982 [40] [cmk.web.background-job 1320667] Exception in background function (Crash ID: 75a20c60-5be7-11f0-bc6b-0050569427da)
Traceback (most recent call last):
File “/omd/sites/lra/lib/python3/cmk/gui/background_job/_process.py”, line 186, in _execute_function
target.callable(job_interface, target.args)
File “/omd/sites/lra/lib/python3/cmk/gui/cee/agent_bakery/bake_agents.py”, line 151, in bake_agents_job_entry_point
if output := bake_agents(
^^^^^^^^^^^^
File “/omd/sites/lra/lib/python3/cmk/gui/watolib/check_mk_automations.py”, line 560, in bake_agents
_automation_serialized(
File “/omd/sites/lra/lib/python3/cmk/gui/watolib/check_mk_automations.py”, line 61, in _automation_serialized
cmdline, serialized_result = check_mk_local_automation_serialized(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/omd/sites/lra/lib/python3/cmk/gui/watolib/automations.py”, line 158, in check_mk_local_automation_serialized
raise MKAutomationException(msg)
cmk.gui.watolib.automations.MKAutomationException: Error running automation call bake-agents (exit code 2), error:

[Errno 2] No such file or directory: ‘/omd/sites/lra/var/check_mk/agents/linux_rpm/packages/53e9f43bc9a388eb’

Exception (Crash ID: 75a20c60-5be7-11f0-bc6b-0050569427da): Error running automation call bake-agents (exit code 2), error:
[Errno 2] No such file or directory: ‘/omd/sites/lra/var/check_mk/agents/linux_rpm/packages/53e9f43bc9a388eb’

The problem is (maybe) a update in centos 9 and centos 10.
I made a backup and create a new machine with ubuntu 24.04. and checkmk 2.4.0p7 without any problem.
I will change the productive system to ubuntu in the next days…

looks like this is fixed with 2.4.0p17

Werk #18935: OpenSSL Upgrade Compatibility Fix