Error registering with hostname - 500 Internal Server Error

CMK version: 2.1.0p1 Enterprise
OS version: Ubuntu 20.04.4 LTS

Error message: ERROR [cmk_agent_ctl] Error registering with hostname at monitoring.domain.net:8000/ger

Systemd version: systemd 245 (245.4-4ubuntu3.16)

Output of “cmk-agent-ctl":

root@client:~# cmk-agent-ctl register --hostname client.domain.net --server monitoring.domain.net --site ger --user reg_agent --password 'some-password' --trust-cert -vv
INFO [cmk_agent_ctl] starting
INFO [cmk_agent_ctl] Loaded config from '"/var/lib/cmk-agent/cmk-agent-ctl.toml"', legacy pull 'LegacyPullMarker("/var/lib/cmk-agent/allow-legacy-pull")' exists
DEBUG [reqwest::connect] starting new connection: http://monitoring.domain.net/
DEBUG [reqwest::async_impl::client] response '200 OK' for http://monitoring.domain.net/ger/check_mk/api/1.0/domain-types/internal/actions/discover-receiver/invoke
DEBUG [reqwest::connect] starting new connection: https://monitoring.domain.net:8000/
DEBUG [reqwest::async_impl::client] response '200 OK' for https://monitoring.domain.net:8000/ger/agent-receiver/pairing
DEBUG [reqwest::connect] starting new connection: https://monitoring.domain.net:8000/
DEBUG [reqwest::async_impl::client] response '500 Internal Server Error' for https://monitoring.domain.net:8000/ger/agent-receiver/register_with_hostname
ERROR [cmk_agent_ctl] Error registering with hostname at monitoring.domain.net:8000/ger

Caused by:
    Request failed with code 500 Internal Server Error: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <html><head>
    <title>500 Internal Server Error</title>
    </head><body>
    <h1>Internal Server Error</h1>
    <p>The server encountered an internal error or
    misconfiguration and was unable to complete
    your request.</p>
    <p>Please contact the server administrator at 
     nobody@localhost to inform them of the time this error occurred,
     and the actions you performed just before this error.</p>
    <p>More information about this error may be available
    in the server error log.</p>
    </body></html>

Hi,
nach dem Upgrade auf 2.1.0p1 wollte ich die TLS Verbindung der Agents einrichten, stoße aber auf das oben genannte Problem. Die Agenten wurden durch die Bakery ebenfalls aktualisiert.

Der User hat die notwendigen Berechtigungen für das pairing. Hat jemand eine Idee?

Beste Grüße,
Arne

Hi Arne, hatte das (vermutlich) selbe Problem: Permissions for automation user to run cmk-agent-ctl register?

Bei mir hat es geholfen die Berechtigung “Write access to all hosts and folders” zu aktivieren.
Muss man natürlich selbst wissen ob man dem entsprechenden Account diese Berechtigung geben will.

Grüße
Niklas

Hi @nir ,

besten Dank für den Hinweis. Das war die Lösung.

Grüße,
Arne

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.