Error Registering Windows Agent: You need to be authenticated to use the REST API

CMK version: 2.1.0p3
OS version: Ubuntu 20.04.04

Error message:

[2022-06-23 13:14:17.442520 -04:00] ERROR [cmk_agent_ctl] src\main.rs:29: Error pairing with xx.xx.xx.xx:8000/monitoring                                                                                                                                                                                                                                                                                                            Caused by:                                                                                                                                                                                                            Request failed with code 401 Unauthorized: You need to be authenticated to use the REST API. 

Following the instructions here, I am attempting to register Windows agent with the following command:

"C:\Program Files (x86)\checkmk\service\cmk-agent-ctl.exe" register --hostname xx --server xx --site monitoring --user automation --password xx

I get past accepting the certificate and immediately receive that error. Windows 11 21H2.

I haven’t tried it with the agent registration for tls but at least the bakery registration needed a normal user with a password and not an automation user with a secret.

Yesterday (the doc is built at 23:15 UTC+2) we added this section for trouble shooting. Just skip this call to the REST API By providing the port directly:

I have the same error only on one device. Do you managed to solve this issue?

1 Like

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.