CMK version: 2.1.0p21.cee OS version: Ubuntu 22.04.1 LTS
Error message:
09:10:32 ERROR An exception occured
Traceback (most recent call last):
File "/omd/sites/com11/lib/python3/cmk/cee/dcd/connectors/piggyback.py", line 229, in _execute_phase2
cmk_hosts = self._web_api.get_all_hosts()
File "/omd/sites/com11/lib/python3/cmk/cee/dcd/web_api.py", line 224, in get_all_hosts
resp = self._session.get("/domain-types/host_config/collections/all")
File "/omd/sites/com11/lib/python3.9/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/omd/sites/com11/lib/python3/cmk/cee/dcd/web_api.py", line 142, in request
raise MKAPIError(f"{response.text} (URL: {url})")
cmk.cee.dcd.web_api.MKAPIError: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
Unauthorized
This server could not verify that you
are authorized to access the document
requested. Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.
</body></html>
(URL: http://localhost:5001/com11/check_mk/api/1.0/domain-types/host_config/collections/all)
I have created a new connection under “Dynamic host management”. At the beginning the connection complained that the automation user ‘automation’ was missing in my site. I created this user manually although it should be created by checkmk in new sites. After that I get this error message through the connection.
I have exactly the same problem after changing user so it will stop complaining i am getting
12:57:58 ERROR An exception occured
Traceback (most recent call last):
File "/omd/sites/mysite/lib/python3/cmk/cee/dcd/connectors/piggyback.py", line 229, in _execute_phase2
cmk_hosts = self._web_api.get_all_hosts()
File "/omd/sites/mysite/lib/python3/cmk/cee/dcd/web_api.py", line 224, in get_all_hosts
resp = self._session.get("/domain-types/host_config/collections/all")
File "/omd/sites/mysite/lib/python3.9/site-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/omd/sites/stepit/lib/python3/cmk/cee/dcd/web_api.py", line 142, in request
raise MKAPIError(f"{response.text} (URL: {url})")
cmk.cee.dcd.web_api.MKAPIError: {"title": "You need to be authenticated to use the REST API.", "status": 401} (URL: http://localhost:5000/mysite/check_mk/api/1.0/domain-types/host_config/collections/all)
OK i think this can be closed , problem is that automation user cannot have password
“You create an automation user like a normal user, but do not assign a normal password, but instead an automation password (Automation secret). This password can be generated automatically with the random cube option:”
after selecting automation secret for machine account it stop throwing an error , i guess idea is that user doesn’t have to authenticate …
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.