Thanks for the assistance.
The agent was decommissioned very shortly after the initial removal (our usual process which resulted in the agent being shut down BEFORE being removed from wazuh wasn't followed), so it's certainly not that agent's connection causing the error.
From the command history, it looks like the agent was removed from wazuh, but re-enrolled itself, then the agent was shut down and the new agent ID given to it also removed from wazuh.
My suspicion is the error is generated by a connection between the indexer and the wazuh-manager system (not sure which direction). There is presumably still some knowledge about this deleted agent in one of these two systems, but not the other? However every method I've tried to locate any config related to the agent has shown nothing - which includes the agent_control bin and also querying the agent API via the portal dev tools. It doesn't show up in the manger client.keys.
I've already restarted the full stack, in fact I've even upgraded the stack to see if that would help.
Can you provide instructions on how to check for the certificate details in the wazuh server certificate store? All the certificate .pem files I've found around the place are valid?
There aren't any corresponding log entries in the wazuh-manager's api.log file, unfortunately. There is the following:
2025/03/11 13:10:00 INFO: wazuh-wui 10.0.30.50 "GET /cluster/nodes" with parameters {"select": "name"} and body {} done in 0.021s: 401
2025/03/11 13:10:00 INFO: wazuh-wui 10.0.30.50 "GET /cluster/nodes" with parameters {"select": "name"} and body {} done in 0.023s: 401
2025/03/11 13:10:01 INFO: wazuh-wui 10.0.30.50 "POST /security/user/authenticate" with parameters {} and body {} done in 1.421s: 200
2025/03/11 13:10:01 INFO: wazuh-wui 10.0.30.50 "POST /security/user/authenticate" with parameters {} and body {} done in 0.845s: 200
2025/03/11 13:10:02 INFO: wazuh-wui 10.0.30.50 "GET /cluster/nodes" with parameters {"select": "name"} and body {} done in 0.133s: 200
2025/03/11 13:10:02 INFO: wazuh-wui 10.0.30.50 "GET /cluster/nodes" with parameters {"select": "name"} and body {} done in 0.138s: 200
But that looks like an initial failed auth which is retried & succeeds...
Regards,
--Alan