Error running automation call bake-agents (exit code 1) / windows/checkmk.dat

CMK version: CheckMK 2.2.0 CEE
OS version: Debian 12

Hey guys

On one of my instances I get the following error since today while tying to bake new agents.

Error message:

Exception: Error running automation call bake-agents (exit code 1), error: 
ERROR: Error on creating msi file: [Errno 2] No such file or directory: '/omd/sites/sitename/var/check_mk/agents/.files_cache/a3e5d09565047524/windows/checkmk.dat', work_dir is /omd/sites/sitename/tmp/msi-update.oga_qqr4

More information can be found in ~/var/log/web.log
Agent baking for all hosts started...
2024-06-06 15:19:16,160 [30] [cmk.web.automations 2792596] 'check_mk --automation bake-agents' returned 'ERROR: Error on creating msi file: [Errno 2] No such file or directory: '/omd/sites/sitename/var/check_mk/agents/.files_cache/a3e5d09565047524/windows/checkmk.dat', work_dir is /omd/sites/sitename/tmp/msi-update.oga_qqr4
'
2024-06-06 15:19:16,160 [40] [cmk.web.automations 2792596] Error running 'check_mk --automation bake-agents' (exit code 1)
2024-06-06 15:19:16,160 [40] [cmk.web.background-job 2792596] Exception in background function
Traceback (most recent call last):
  File "/omd/sites/sitename/lib/python3/cmk/gui/background_job.py", line 340, in _execute_function
    self._target(self._job_interface)
  File "/omd/sites/sitename/lib/python3/cmk/gui/cee/plugins/wato/agent_bakery/misc.py", line 883, in <lambda>
    lambda job_interface: bake_agents_background_job(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sitename/lib/python3/cmk/gui/cee/plugins/wato/agent_bakery/misc.py", line 1053, in bake_agents_background_job
    bake_agents(
  File "/omd/sites/sitename/lib/python3/cmk/gui/watolib/check_mk_automations.py", line 439, in bake_agents
    _automation_serialized(
  File "/omd/sites/sitename/lib/python3/cmk/gui/watolib/check_mk_automations.py", line 53, in _automation_serialized
    cmdline, serialized_result = check_mk_local_automation_serialized(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/sitename/lib/python3/cmk/gui/watolib/automations.py", line 148, in check_mk_local_automation_serialized
    raise local_automation_failure(
cmk.gui.watolib.automations.MKAutomationException: Error running automation call <tt>bake-agents</tt> (exit code 1), error: <pre>ERROR: Error on creating msi file: [Errno 2] No such file or directory: '/omd/sites/sitename/var/check_mk/agents/.files_cache/a3e5d09565047524/windows/checkmk.dat', work_dir is /omd/sites/sitename/tmp/msi-update.oga_qqr4
</pre>
Exception: Error running automation call <tt>bake-agents</tt> (exit code 1), error: <pre>ERROR: Error on creating msi file: [Errno 2] No such file or directory: '/omd/sites/sitename/var/check_mk/agents/.files_cache/a3e5d09565047524/windows/checkmk.dat', work_dir is /omd/sites/sitename/tmp/msi-update.oga_qqr4
</pre>

Any ideas?

Greetz
Ovrld

Remove this folder and try again to bake the agents.

1 Like

@andreas-doehler
Maybe this errors comes from the deletion of the .files_cache folder?

I moved the further error to a new topic - maybe it’s a different problem:

Normally not - the cache folder is build if not existing. Empty site has not such folder.

When I compare the new installed check-mk agent to one of a server where everything is working fine, a lot of files are missing in the β€œ/var/lib/cmk-agent/” folder:

The affected system:

cmk-agent/
└── scripts
    └── super-server
        β”œβ”€β”€ 0_systemd
        β”‚   β”œβ”€β”€ cmk-update-agent.service
        β”‚   └── cmk-update-agent.timer
        └── setup

One server without issues:

cmk-agent/
β”œβ”€β”€ cmk-agent-ctl.gz
β”œβ”€β”€ cmk-agent-ctl.toml
β”œβ”€β”€ registered_connections.json
└── scripts
    β”œβ”€β”€ cmk-agent-useradd.sh
    └── super-server
        β”œβ”€β”€ 0_systemd
        β”‚   β”œβ”€β”€ check-mk-agent-async.service
        β”‚   β”œβ”€β”€ check-mk-agent@.service
        β”‚   β”œβ”€β”€ check-mk-agent.socket
        β”‚   β”œβ”€β”€ check-mk-agent.socket.fallback
        β”‚   β”œβ”€β”€ cmk-agent-ctl-daemon.service
        β”‚   β”œβ”€β”€ cmk-update-agent.service
        β”‚   β”œβ”€β”€ cmk-update-agent.timer
        β”‚   └── setup
        β”œβ”€β”€ 1_xinetd
        β”‚   └── setup
        └── setup

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.