Automatisches Agent-Update Fehlerhaft

Seit dem Update auf 2p11 (Fehler besteht auch in 2p12) können sich manche Clients nicht manuell updaten.
Betriebssystem ist:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.6 LTS
Release:        18.04
Codename:       bionic

Fehlermeldung ist die folgende:

2021-10-07 11:59:46,476 INFO: Output from dpkg:
  (Reading database ... 283078 files and directories currently installed.)
  Preparing to unpack /tmp/check-mk-agent-17qzfni9 ...
  Disable Checkmk agent in systemd (if active)...
  Unpacking check-mk-agent (2.0.0p12-1.###########) over (2.0.0p12-############) ...
  Reloading xinetd...
  Setting up check-mk-agent (2.0.0p12-1.#############) ...
  Reloading xinetd...
  Enable Checkmk agent in systemd...
  Created symlink /etc/systemd/system/sockets.target.wants/check-mk-agent.socket → /etc/systemd/system/check-mk-agent.socket.
  Created symlink /etc/systemd/system/multi-user.target.wants/check-mk-agent-async.service → /etc/systemd/system/check-mk-agent-async.service.
  Job for check-mk-agent.socket failed.
  See "systemctl status check-mk-agent.socket" and "journalctl -xe" for details.
  dpkg: error processing package check-mk-agent (--install):
   installed check-mk-agent package post-installation script subprocess returned error exit status 1
  Errors were encountered while processing:
   check-mk-agent
  
2021-10-07 11:59:46,477 DEBUG: Caught Exception:
Traceback (most recent call last):
  File "cmk_update_agent.py", line 1579, in _perform_installation
  File "cmk_update_agent.py", line 1605, in _invoke_installer
  File "cmk_update_agent.py", line 1615, in _install_agent_linux_deb
  File "cmk_update_agent.py", line 1702, in _invoke_unix_pkg_manager
Exception: Error during installation of package
2021-10-07 11:59:46,478 ERROR: Failed installing Checkmk agent: Error during installation of package.
2021-10-07 11:59:46,478 INFO: Hint: You can try to install or analyze the agent package manually by downloading it from the checkmk server. You can find it by looking for your OS's package for host Intranet with agent hash ############### at the agent bakery.
2021-10-07 11:59:46,482 DEBUG: Caught Exception:
Traceback (most recent call last):
  File "cmk_update_agent.py", line 1889, in main
  File "cmk_update_agent.py", line 878, in run
  File "cmk_update_agent.py", line 1497, in _run_mode
  File "cmk_update_agent.py", line 1199, in _do_update_as_command
  File "cmk_update_agent.py", line 1280, in _do_update_agent
  File "cmk_update_agent.py", line 1506, in _trigger_installation
  File "cmk_update_agent.py", line 1563, in install_agent
  File "cmk_update_agent.py", line 1579, in _perform_installation
  File "cmk_update_agent.py", line 1605, in _invoke_installer
  File "cmk_update_agent.py", line 1615, in _install_agent_linux_deb
  File "cmk_update_agent.py", line 1702, in _invoke_unix_pkg_manager
Exception: Error during installation of package
2021-10-07 11:59:46,484 ERROR: Error during installation of package

Vielen Dank im Voraus!

MFG

Und was sagen die Log-Einträge? Ist dort eventuell der xinetd aktiv und lauscht an Port 6556?

stauts des Sockets:

check-mk-agent.socket - Checkmk agent socket
   Loaded: loaded (/etc/systemd/system/check-mk-agent.socket; enabled; vendor preset: enabled)
   Active: failed (Result: resources) since Wed 2021-10-06 19:49:58 CEST; 17h ago
   Listen: [::]:6556 (Stream)
 Accepted: 1; Connected: 0

Okt 07 11:59:46 ##### systemd[1]: Failed to listen on Checkmk agent socket.
Okt 07 12:23:39 ##### systemd[1]: check-mk-agent.socket: Failed to receive listening socket: Input/output error
Okt 07 12:23:39 #####  systemd[1]: check-mk-agent.socket: Failed to listen on sockets: Input/output error
Okt 07 12:23:39  ##### systemd[1]: check-mk-agent.socket: Failed with result 'resources'.
Okt 07 12:23:39  ##### systemd[1]: Failed to listen on Checkmk agent socket.
Okt 07 12:54:21  ##### systemd[10057]: check-mk-agent.socket: Failed to create listening socket: Address already in use
Okt 07 12:54:21  ##### systemd[1]: check-mk-agent.socket: Failed to receive listening socket: Input/output error
Okt 07 12:54:21  ##### systemd[1]: check-mk-agent.socket: Failed to listen on sockets: Input/output error
Okt 07 12:54:21  ##### systemd[1]: check-mk-agent.socket: Failed with result 'resources'.
Okt 07 12:54:21  ##### systemd[1]: Failed to listen on Checkmk agent socket.

Der Port 6556 wird von xinetd verwendet laut lsof

Ich habe checkmk damals mit xinetd installiert. Eigentlich habe ich aber alle Agents auf unseren Server gleich installiert. Bei manchen funktioniert jedoch das update.

Was muss ich wie umstellen?

In der Agent Bakery gibt es jetzt einen neuen Regelsatz, mit dem eingestellt werden kann, ob der Linux-Agent per xinetd. systemd oder manuell (z.B. via SSH) gestartet werden soll.

1 Like

Danke!
Das erstellen der Regel (Checkmk agent network service (Linux)), neu-backen und entfernen von xinetd auf dem Host hat das Problem behoben!

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.