Failed connection test to linux hosts

**CMK version: 2.3.0p31
**OS version: Debian 12 bookworm

Error message:
Agent exited with code 1: HTTPSConnectionPool(host=‘192.168.11.65’, port=443): Max retries exceeded with url: /sdk (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7f65a3868e00>: Failed to establish a new connection: [Errno 111] Connection refused’))

A few weeks ago I set up a new CheckMK server and added some of our workstations (Windows, Linux) as hosts. Everything worked fine. In the meantime I have been busy with other things and have only made a few adjustments from time to time.
Today I wanted to continue with the configuration and realised that the connection test fails for the three Linux hosts (Debian, Ubuntu). I am very sure that it worked last time. I have no idea what I should have changed in the meantime that would result in this. Very strangely, it also affects the connection to the agent of the CheckMK server itself.

I did some tests on the Checkmk server, which is also affected, and they were all ok.

  • sudo cmk-agent-ctl status → Agent responds correctly
  • sudo ss -tulpn | grep 6556 → Agent listens on port 6556
  • sudo systemctl status check-mk-agent.socket → also ok

Does anyone have any idea what could be causing this?
Many thanks in advance!

It looks like there is a special agent configured for these hosts.

Please check the first few lines of the output of cmk -D HOSTNAME especially for “Type of agent”.

1 Like

I have already read this several times in the forum. However, I am not aware of having used a special agent. I downloaded the non-customised version directly from the server.
http://server/instance/check_mk/agents/check-mk-agent_2.3.0p31-1_all.deb

By the way, the CheckMK server is a VM

Here is the output from cmk -D

Type of agent:
Program: /omd/sites/neutron/share/check_mk/agents/special/agent_vsphere -u checkmk ‘-s=UwyDs#DW5’ -i hostsystem,virtualmachine,datastore,counters --direct --hostname lnx2 -P --spaces cut --no-cert-check 192.168.11.65
Process piggyback data from /omd/sites/neutron/tmp/check_mk/piggyback/lnx2

And there you have it: The special agent for monitoring a vSphere infrastructure is assigned to the host, overriding the default agent query on port 6556.

You need to refine the conditions in the rules for the vSphere monitoring.

I don’t understand. Where do I do that?

In Setup search for the ruleset “VMware ESX via vSphere”.

It should contain at least one rule where the conditions are too generic and include the host.

1 Like

That’s right, that’s it. I have now adjusted the rule so that it only affects the ESX servers themselves. Everything works now.

Many thanks for the great support!

@WolleKette please mark Roberts post as the solution, as he was the one who put in the effort to solve this :wink:

1 Like