Cmk-agent-ctl register: Failed to discover agent receiver port

Hey, after upgrading to 2.1.0 and trying to enable tls, I face this error trying to register the agent with cmk-agent-ctl register: Failed to discover agent receiver port from Checkmk REST API, both with http and https.

CMK version:

root@paperless-ngx:~# cmk-agent-ctl status
Version: 2.1.0

root@checkmk:~# omd sites
SITE             VERSION          COMMENTS
home             2.1.0.cee        default version

OS version:

root@paperless-ngx:~# uname -a
Linux paperless-ngx 5.13.19-6-pve #1 SMP PVE 5.13.19-15 (Tue, 29 Mar 2022 15:59:50 +0200) x86_64 GNU/Linux
Debian

root@paperless-ngx:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Error message:

root@paperless-ngx:~# cmk-agent-ctl register --trust-cert -H paperless-ngx.gerhards.local -s checkmk.gerhards.local -i home -U cmkadmin
ERROR [cmk_agent_ctl] Failed to discover agent receiver port from Checkmk REST API, both with http and https.

Error with http:
Failed to discover agent receiver port from http://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
error sending request for url (http://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:

Error with https:
Failed to discover agent receiver port from https://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
error sending request for url (https://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:

You have two options here:

  1. Either import the self signed certificate on this server paperless-ngx or use the same command with port. The port can be different in your case. So, get this from “omd config show” on your CMK instance.
cmk-agent-ctl register --trust-cert -H paperless-ngx.gerhards.local:8000 -s checkmk.gerhards.local -i home -U cmkadmin
1 Like

Thx for the quick reply, adding the port gives still the same result:

root@paperless-ngx:~# cmk-agent-ctl register --trust-cert -H paperless-ngx.gerhards.local:8000 -s checkmk.gerhards.local -i home -U cmkadmin
ERROR [cmk_agent_ctl] Failed to discover agent receiver port from Checkmk REST API, both with http and https.

Error with http:
Failed to discover agent receiver port from http://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
error sending request for url (http://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:

Error with https:
Failed to discover agent receiver port from https://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
error sending request for url (https://checkmk.gerhards.local/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:

At least omd config home shows its 8000:
image

I have not tried adding the certificate yet.

Try replacing this checkmk.gerhards.local with IP.

Nope, still the same error

root@paperless-ngx:~# cmk-agent-ctl register --trust-cert -H paperless-ngx.gerhards.local:8000 -s 10.0.4.107 -i home -U cmkadmin
ERROR [cmk_agent_ctl] Failed to discover agent receiver port from Checkmk REST API, both with http and https.

Error with http:
Failed to discover agent receiver port from http://10.0.4.107/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
error sending request for url (http://10.0.4.107/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:

Error with https:
Failed to discover agent receiver port from https://10.0.4.107/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
error sending request for url (https://10.0.4.107/home/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke): error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (self signed certificate)
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914:

Your command is incorrect. Try this:

root@paperless-ngx:~#  cmk-agent-ctl register --hostname paperless-ngx.gerhards.local --server 10.0.4.107:8000 --site home -U cmkadmin -vv

2 Likes

I did not notice I wrote :8000 as the hostname, not for the server.
Thanks for pointing me right <3

3 posts were split to a new topic: ERROR [cmk_agent_ctl] Error while loading registered connections

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.