########################
# trouble with checkmk agent check-mk-agent_2.1.0p35-1_all.deb on debian 11
# >> error message: Systemd Service Summary>> service failed (cmk-agent-ctl-daemon)
########################

-----------------
!!before it worked with problem with agent version check-mk-agent_2.0.0p27-1_all.deb
> the error come up since updating to 2.1.0p35 agent version
-----------------

######################
#Analysing the problem
######################

###journalctl -u cmk-agent-ctl-daemon.service
-- Journal begins at Mon 2022-09-26 15:10:14 CEST, ends at Wed 2023-10-18 17:12:07 CEST. --
Oct 18 17:06:41 my-system systemd[1]: Started Checkmk agent controller daemon.
Oct 18 17:06:41 my-system cmk-agent-ctl[1286]: ERROR [cmk_agent_ctl] Failed to listen on TCP socket for incoming pull connections.
Oct 18 17:06:41 my-system cmk-agent-ctl[1286]: Error with IPV6:
Oct 18 17:06:41 my-system cmk-agent-ctl[1286]: Address in use (os error 98)
Oct 18 17:06:41 my-system cmk-agent-ctl[1286]: Error with IPV4:
Oct 18 17:06:41 my-system cmk-agent-ctl[1286]: Address in use (os error 98)
Oct 18 17:06:41 my-system systemd[1]: cmk-agent-ctl-daemon.service: Main process exited, code=exited, status=1/FAILURE
Oct 18 17:06:41 my-system systemd[1]: cmk-agent-ctl-daemon.service: Failed with result 'exit-code'.

###systemctl status cmk-agent-ctl-daemon.service
cmk-agent-ctl-daemon.service - Checkmk agent controller daemon
Loaded: loaded (/lib/systemd/system/cmk-agent-ctl-daemon.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2023-10-18 17:08:52 CEST; 8min ago
Process: 758 ExecStart=/usr/bin/cmk-agent-ctl daemon (code=exited, status=1/FAILURE)
Main PID: 758 (code=exited, status=1/FAILURE)
CPU: 2ms

Oct 18 17:08:52 my-system systemd[1]: cmk-agent-ctl-daemon.service: Scheduled restart job, restart counter is at 5.
Oct 18 17:08:52 my-system systemd[1]: Stopped Checkmk agent controller daemon.
Oct 18 17:08:52 my-system systemd[1]: cmk-agent-ctl-daemon.service: Start request repeated too quickly.
Oct 18 17:08:52 my-system systemd[1]: cmk-agent-ctl-daemon.service: Failed with result 'exit-code'.
Oct 18 17:08:52 my-system systemd[1]: Failed to start Checkmk agent controller daemon.


### restart service
systemctl restart cmk-agent-ctl-daemon.service

>> does not help


### cmk-agent-ctl command
/usr/bin/cmk-agent-ctl daemon
ERROR [cmk_agent_ctl] Failed to listen on TCP socket for incoming pull connections.

Error with IPV6:
Address in use (os error 98)

Error with IPV4:
Address in use (os error 98)


####################
# my solution >> remove the systemd settings >> and install xinetd
####################
1) remove
/var/lib/cmk-agent/scripts/super-server/0_systemd/setup purge
Removing leftover systemd units: /etc/systemd/system/check_mk.socket, /etc/systemd/system/check_mk@.service, /etc/systemd/system/check_mk-async.service\nRemoving agent controller: /usr/bin/cmk-agent-ctl
Removing deployed systemd units: check-mk-agent-async.service, cmk-agent-ctl-daemon.service, check-mk-agent@.service, check-mk-agent.socket

2) install xinetd, so that the checkmk agent will be started from there
sudo apt-get -y install xinetd





-------------------------------------------
link with no solution ;-)
-------------------------------------------
https://forum.checkmk.com/t/cmk-agent-systemd-service-summary-1-service-failed-cmk-agent-ctl-daemon/34005

computer2know :: thank you for your visit :: have a nice day :: © 2024