Table of Contents |
---|
Agent controller - Connection refused
...
Info |
---|
With Checkmk 2.1, we released the new agent controller with a TLS connection. Detailed docs can be found here: |
Status | ||||
---|---|---|---|---|
|
Table of Contents |
---|
Agent controller - Connection refused
Problem
In this manual, we will show you how to debug the below error:
Please run the following commands to check the state of the agent controller and the port states:
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@mylinuxhost~# ss -tulpn | grep 6556 root@mylinuxhost~# ps waux | grep cmk-agent-ctl root@mylinuxhost~# cmk-agent-ctl status root@mylinuxhost~# systemctl status check-mk-agent.socket root@mylinuxhost~# systemctl status cmk-agent-ctl-daemon.service |
...
After installing the agent, the registration is not working and showing the following issue:
...
Solution
Please check and verify that the agent controller is running:
Code Block | ||||
---|---|---|---|---|
| ||||
root@mylinuxhost~# ss -tulpn | grep 6556 root@mylinuxhost~# ps waux | grep cmk-agent-ctl root@mylinuxhost~# cmk-agent-ctl status root@mylinuxhost~# systemctl status check-mk-agent.socket root@mylinuxhost~# systemctl status cmk-agent-ctl-daemon.service |
...
If you're using the bakery, you need to create the following rule:
...
Without the bakery, please follow these steps: https://docs.checkmk.com/latest/en/agent_linux_legacy.html#_systemd
...
Upon registering the agent controller for TLS, you encounter this problem:
Code Block | ||
---|---|---|
| ||
root@<cmkserver>root@mylinuxhost:~# cmk-agent-ctl register -H <host> -s <checkmk-server> -i <site> -U <username> 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-server>/<site>/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke error sending request for url (http://<checkmk-server>/<site>/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: (unable to get local issuer certificate) error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (unable to get local issuer certificate) error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (unable to get local issuer 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-server>/<site>/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke error sending request for url (https://<checkmk-server>/<site>/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: (unable to get local issuer certificate) error trying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (unable to get local issuer certificate) error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: (unable to get local issuer certificate) error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1914: |
...
Register the agent with the receiver port (by default 8000, counting up similar to site Apache 5000 → 5001 ...) like so:
Code Block | ||
---|---|---|
| ||
root@<cmkserver>root@mylinuxhost:~# cmk-agent-ctl register -H <host> -s <checkmk-server> -i <site> -U <username> -p:8000 |
...