Agent controller registration

CMK version: 2.1.p16
OS version: RH8,Windows Server 2019

Error message:
I can’t use the cmk-agent-ctl register command when my host resists on a slave site. However if I (faulty) try to register the host to my MAIN site first and THEN register to my slave site it works…
This is the same behaviour on Windows and Linux.

First error (when trying to register to the slave site first)

Error with http:
Failed to discover agent receiver port from https://xxx/poller2/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
invalid digit found in string

This might of course be true as the API shows an HTML page to include the port in. And yes the API endpoint works in a standard browser. Also note that the the error message is displayed both for http and https, but the message is reversed!! - Meaning the output for https shows the http endpoint and http shows the https endpoint…

If I register (unsuccessful) to my main site

Error registering with hostname at config.nebuchadnezzar.local:8000/checkmk_config
Caused by:
    Request failed with code 403 Forbidden: This host is monitored on the site poller2, but you tried to register it at the site checkmk_config.

Now it’s beyond my understanding WHY the controller actually FINDS the correct site but is dumb enough not to register the host at the right site… anyhow… After that faulty registration a new registration to the slave works without any other changes… Here there no messages about a successful registration…

.....
Issued by:
        Site 'poller2' local CA
Issued to:
        poller2
Validity:
        From Sun, 27 Nov 2022 11:39:56 +0000
        To   Fri, 30 Mar 3021 11:39:56 +0000

Do you want to establish this connection? [Y/n]
> Y
PS C:\Program Files (x86)\checkmk\service>

Anyone seen this? I have not yet tested this in 2.0p16
The whole agent TLS registration process is kind’a broken, Not easy for someone who have 35 slave sites and have to move hosts around, ending up having all internal CA:s root certs everywhere…

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

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.