Connection refused after update the agent

CMK version: 2.1.0-1
OS version: CentOS 8

Hi,

After update the agent on a client I get a connection refused error. How can I troubleshoot this error?
This is my procedure and the error:

Error message:

[root@CMK01 tmp]# rpm -ivh check-mk-agent-2.1.0-1.noarch.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:check-mk-agent-2.1.0-1           ################################# [100%]

Deploying systemd units: cmk-agent-ctl-daemon.service check-mk-agent.socket check-mk-agent@.service check-mk-agent-async.service
Deployed systemd
Creating/updating cmk-agent user account ...
Reloading xinetd
Redirecting to /bin/systemctl reload xinetd.service
Activating systemd unit 'cmk-agent-ctl-daemon.service'...
Created symlink /etc/systemd/system/multi-user.target.wants/cmk-agent-ctl-daemon.service → /usr/lib/systemd/system/cmk-agent-ctl-daemon.service.
Activating systemd unit 'check-mk-agent.socket'...
Created symlink /etc/systemd/system/sockets.target.wants/check-mk-agent.socket → /usr/lib/systemd/system/check-mk-agent.socket.
Activating systemd unit 'check-mk-agent-async.service'...
Created symlink /etc/systemd/system/multi-user.target.wants/check-mk-agent-async.service → /usr/lib/systemd/system/check-mk-agent-async.service.
[root@CMK01 tmp]#
[root@CMK01 tmp]#
[root@CMK01 tmp]# telnet localhost 6556
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused

[root@CMK01 tmp]# cat /etc/xinetd.d/check_mk.rpmsave | egrep -v '^#|#|^$'
service check_mk
{
        type           = UNLISTED
        port           = 6556
        socket_type    = stream
        protocol       = tcp
        wait           = no
        user           = root
        server         = /usr/bin/check_mk_agent
        per_source     = 3
        flags          = IPv4
        log_on_success =
        disable        = no
}

Also I see on message error this line:

May 31 09:09:59 CMK01 cmk-agent-ctl[1907624]: ERROR [cmk_agent_ctl] Address family not supported by protocol (os error 97)

How can I start/enable the agent?
thanks in advance

Please provide the output of:

systemctl --version
ss -tulpn | grep 6556

In case you disabled IPv6 you might use xinetd as a temporary workaround until p1 is available.

This might be the temporary solution: Agent Problems after update to 2.1.0 - #9 by mschlenker

no 6556 available. This is the problem…
wow! there’s a bug. Ok… I can wait for the next release because actually my server don’t have ipv6 activated.

Please check whether installing the 2.1.0p1 fixes the problem for you.

Got the same problem. @mschlenker also on 2.1.0.p1

Also ipv6 disabled by boot parameter? In this case please revert to the 2.0.0 agent or enable xinetd mode for now. We are investigating the problem.

Yes, ipv6 disabled:

GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="ipv6.disable=1"

the 2.0 agent works for now

Let me guess: Kernel 5.4 or earlier? Booting without disabling IPv6 on the kernel command line and disabling during boot with sysctl might work around the problem, but a proper fix is on the way.

Yes, Kernalversion 4.15.0

Just hit this one, too. We’ve got a couple of systems running Ubuntu 18.04 LTS that uses Linux 4.15 and have the IPv6 Stack disabled.

let me know when the fix is available

I am also interested about the fix. We have some areas where we can’t just enable IPv6 to fix this.

Hi,
thanks for reporting this, the issue has been fixed: Agent controller: Fix agent data transport for IPv4-only hosts
Best, Jörg

2 Likes

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.