CMK version: 2.2.0p27.cee
OS version: Debian 12
Error message:
Some days after the I migrated from 2.1.0 to 2.2.0 I have a lot of issues with my agent bakery. On some of my servers I have issues with the agent bakery upgrading and installation (reinstall):
apt install ./check-mk-agent_2.2.0p27-a89a0acdc7384d5e_all.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'check-mk-agent' instead of './check-mk-agent_2.2.0p27-a89a0acdc7384d5e_all.deb'
The following NEW packages will be installed:
check-mk-agent
0 upgraded, 1 newly installed, 0 to remove and 72 not upgraded.
Need to get 0 B/13.7 MB of archives.
After this operation, 13.7 MB of additional disk space will be used.
Get:1 /home/username/check-mk-agent_2.2.0p27-a89a0acdc7384d5e_all.deb check-mk-agent all 2.2.0p27-2.a89a0acdc7384d5e [13.7 MB]
Selecting previously unselected package check-mk-agent.
(Reading database ... 194268 files and directories currently installed.)
Preparing to unpack .../check-mk-agent_2.2.0p27-a89a0acdc7384d5e_all.deb ...
Unpacking check-mk-agent (2.2.0p27-2.a89a0acdc7384d5e) ...
Setting up check-mk-agent (2.2.0p27-2.a89a0acdc7384d5e) ...
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/0_systemd/setup: No such file
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/0_systemd/setup: No such file
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/0_systemd/setup: No such file
---------------------------------------------
WARNING
This package comes with configuration files
for the following super server(s):
systemd
It is configured to try these (in order of
preference):
systemd
None of these have been applicable.
Hint: It's also possible to call the
Checkmk agent via SSH without a running
agent service.
---------------------------------------------
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/0_systemd/setup: No such file
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/0_systemd/setup: No such file
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/0_systemd/setup: No such file
Scanning processes...
Scanning candidates...
Scanning linux images...
Running kernel seems to be up-to-date.
Restarting services...
systemctl restart cmk-agent-ctl-daemon.service
Failed to restart cmk-agent-ctl-daemon.service: Unit cmk-agent-ctl-daemon.service not found.
But systemd is installed and it worked before:
systemctl --version
systemd 247 (247.3-7+deb11u4)
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified
If I try with “dpkg -i” I get to following error:
sudo dpkg -i check-mk-agent_2.2.0p27-a89a0acdc7384d5e_all.deb
Selecting previously unselected package check-mk-agent.
(Reading database ... 194268 files and directories currently installed.)
Preparing to unpack check-mk-agent_2.2.0p27-a89a0acdc7384d5e_all.deb ...
Unpacking check-mk-agent (2.2.0p27-2.a89a0acdc7384d5e) ...
Setting up check-mk-agent (2.2.0p27-2.a89a0acdc7384d5e) ...
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/setup: No such file
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/setup: No such file
/bin/sh: 0: cannot open /var/lib/cmk-agent/scripts/super-server/setup: No such file
dpkg: error processing package check-mk-agent (--install):
installed check-mk-agent package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
check-mk-agent
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