Agent issue: "Host is registered for TLS but not using it"

CMK version: Checkmk Free Edition 2.1.0p4
OS version: Debian 10

Error message:Host is registered for TLS but not using it

Heyho everyone,

so I updated my Agents to 2.1.0p4. After that I got the error: Version: 2.1.0p4, OS: linux, TLS is not activated on monitored host (see details)

Looking in the documentation with the new agent I knew I had to register him with cmk-agent-ctl register. And now. On every host I register that way I don’t get any agent data because of the Issue Host is registered for TLS but not using it

In the documentation I didn’t found any helpful tip. What am I missing?

Cheers,
Gamie

1 Like

Hello again,

I got a little further. So after resetting ma agent rules and baking a new Client it got wilder. After that EVERY Host was on CRIT with the error: KeyError('use_regular')

I digged a little deeper but wasn’t able to fix it with rebaking etc. My only solution was to purge the agent on EVERY Client, reinstall with the new baked agent, which was set to drop encryption in the output and use TLS.

I did this and now only one host makes trouble: my Raspberry Pi. Still after redploying, the Agent Output is: KeyError('use_regular')

Any hints on how to fix that? Running cmk-agent-ctl register isn’t possible either.

incompatible architecture (arm* instead of x86_64), see:

1 Like

Hello, I have the same problem.
On our servers there is a very old version of check_mk agent installed (1.2.6) and I am updating it all to 2.1.0p9 now, but I am kinda stuck now and I can only get it working with some workarounds.

The problem is whenever I install the new agent and register the server it says Host is registered for TLS but not using it, I can only get it to work when I remove /etc/check_mk after registering and then reinstalling the 2.1.0p9 agent, after that it works.

Hope someone can help me identify what causes this, thanks!

I have the same problem on a fresh setup.

I installed checkmk with docker as described here and here.

On my system, another docker container is running on port 8000, so I forwarded port 8001 on the host to port 8000 on the container instead. No other settings were changed.

From the checkmk interface I got the check-mk-agent at version 2.1.0 and installed via dpkg.

To register the agent, I ran:

sudo cmk-agent-ctl register --hostname localhost --server localhost:8001 --site cmk --user cmkadmin

That gives:

> sudo cmk-agent-ctl status
Version: 2.1.0p10
Agent socket: operational
IP allowlist: any


Connection: localhost:8001/cmk
	UUID: 186f71b9-8d6f-41c6-be44-bb1f7c23ae7b
	Local:
		Connection type: pull-agent
		Certificate issuer: Site 'cmk' local CA
		Certificate validity: Sat, 27 Aug 2022 10:19:46 +0000 - Thu, 28 Dec 3020 10:19:46 +0000
	Remote:
		Connection type: pull-agent
		Registration state: operational
		Host name: localhost

Running cmk-agent-ctl dump gives me a lot of useful information.

When examining the host in the web interface, I no services are found. For the connection tests, ping works but for agent it says Host is registered for TLS but not using it.

Are there any other diagnostic steps that I can perform? Or (as the host and the agent are the same machine), can I disable TLS?

Hey, I had this exact issue only in combination with a preinstalled and older version of the cmk agent, but I believe you should be good if you just remove the agent once with dpkg sudo dpkg -r check-mk-agent and then do a clean reinstall, you can also call cmk-agent-ctl delete-all and re-register the host, make sure that there are no leftovers in /etc/check_mk and /var/lib/check_mk_agent

I my case I was able to completely resolve this problem by doing basically this:

sudo dpkg -r check-mk-agent
sudo dpkg -i <cmk_agent_name>

please let me know if this was of any use for you

Hey @fisher,
hey @all,

I have the same “Host registered for TLS but not using it.” error and tryed to uninstall an reinstall checkmk agent with no change of the situation. The output still is

# sudo cmk-agent-ctl status
Version: 2.1.0p10
Agent socket: operational
IP allowlist: any


Connection: servername:8000/sitename
        UUID: 9d0b0d8e-0104-485d-ad36-8c59c9e94193
        Local:
                Connection type: pull-agent
                Certificate issuer: Site 'sitename' local CA
                Certificate validity: Mon, 05 Sep 2022 09:18:03 +0000 - Sat, 06 Jan 3021 09:18:03 +0000
        Remote:
                Connection type: pull-agent
                Registration state: operational
                Host name: hostname

Can anyone help?
Flo

Yes - you can try deleting the state file in /etc:

→ cmk-update-agent.state

register again. I guess it will work afterwards :slight_smile:

br
Oliver

Hello,

I had the same issue. I fixed this issue by adding the IP address of the host.
On the checkmk portal setup, add host, input hostname and IP address

Hope this helps!
Zak

Hello, follow this guide and hope it will help you ^^

Best Regards
Nabisadah

That file did not exist here on Ubuntu 22.04

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.