Secret could not be found. Maybe user 'automation' is missing

CMK version:2.1.0p40
OS version:d Hat Enterprise Linux release 8.9

**Error message:2024-04-18 17:53:28,618 [40] [cmk.dcd.vmware-vcenter] Trace:
Traceback (most recent call last):
File “/omd/sites/pdc1/lib/python3/cmk/cee/dcd/connectors/utils.py”, line 187, in execute
self._execute_sync()
File “/omd/sites/pdc1/lib/python3/cmk/cee/dcd/connectors/utils.py”, line 241, in _execute_sync
self._execute_phase2(phase1_result)
File “/omd/sites/pdc1/lib/python3/cmk/cee/dcd/connectors/piggyback.py”, line 236, in _execute_phase2
cmk_hosts = self._web_api.get_all_hosts()
File “/omd/sites/pdc1/lib/python3/cmk/cee/dcd/web_api.py”, line 228, in get_all_hosts
resp = self._session.get(“/domain-types/host_config/collections/all”)
File “/omd/sites/pdc1/lib/python3.9/site-packages/requests/sessions.py”, line 602, in get
return self.request(“GET”, url, **kwargs)
File “/omd/sites/pdc1/lib/python3/cmk/cee/dcd/web_api.py”, line 128, in request
user_id, secret = self._credentials.for_api_call()
File “/omd/sites/pdc1/lib/python3/cmk/cee/dcd/models.py”, line 289, in for_api_call
return (user_id, self._read_secret(user_id))
File “/omd/sites/pdc1/lib/python3/cmk/cee/dcd/models.py”, line 298, in _read_secret
raise MKGeneralException(
cmk.utils.exceptions.MKGeneralException: Secret could not be found. Maybe user ‘automation’ is missing.
**

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

We upgraded check_mk from 2.0.0p34 to 2.1.0p40. We registered two hosts manually. But we are getting an Error in ~/var/log/dcd.log. See above.
In " [Check_MK]" service monitoring we see the following critical :
[agent] ConnectionResetError(104, 'Connection reset by peer')**CRIT**, Got no information from host**CRIT**, execution time 0.0 sec
We deleted the user ’ automation’ and created it again but it didn’t solve the problem.
Please advice

You may have at some point deleted the user named “automation” from your Users.
But some Background Operations need this User.

Check in Setup → Users for that, and if not there recreate this user with an automation secret and admin privileges.

2 Likes

Ok, just saw your second Post in detail. That’s a different Problem.
Here it says that the connection to an Host was not possible.

Are you using the DCD?

And what do you mean by register? TLS?

Can you ping the host, and is port 6556 reachable?

DCD fails also if automation user is missing.
I think also the first assumption from @bkuhn is the right one.
The automation user will also be missing if this instance was existing before 1.6 or so.

2 Likes

Many Thanks @bkuhn,

Using the “Automation secret for machine accounts” option in stead of “Normal user login with password” in “Setup → Users → Users → Edit user automation → security” solved the problem.

You can give the “Solution” also to Bastian :wink:

1 Like