Dear Team,
I have tried to add the agent manually using
/var/ossec/bin/manage_agents, that worked. And no specific error in the agent side after that.
I'll list all the steps below
i have installed agent using
sudo systemctl daemon-reload
sudo systemctl enable wazuh-agent
sudo systemctl start wazuh-agent
the log says, tail /var/ossec/logs/ossec.log -n 500
2025/03/11 06:25:00 wazuh-execd: INFO: Started (pid: 3838171).
2025/03/11 06:25:01 wazuh-agentd: INFO: (1410): Reading authentication keys file.
2025/03/11 06:25:01 wazuh-agentd: INFO: Using notify time: 10 and max time to reconnect: 60
2025/03/11 06:25:01 wazuh-agentd: INFO: Version detected -> Linux |test-MUM-ERP-SRV1 |6.5.0-1023-aws |#23~22.04.1-Ubuntu SMP Fri Jun 21 22:58:06 UTC 2024 |aarch64 [Ubuntu|ubuntu: 22.04.4 LTS (Jammy Jellyfish)] - Wazuh v4.11.0
2025/03/11 06:25:01 wazuh-agentd: INFO: Started (pid: 3838231).
2025/03/11 06:25:01 wazuh-agentd: INFO: Requesting a key from server: 172.16.0.41
2025/03/11 06:25:01 wazuh-agentd: INFO: No authentication password provided
2025/03/11 06:25:01 wazuh-agentd: INFO: Using agent name as: test-MUM-ERP-SRV1
2025/03/11 06:25:01 wazuh-agentd: INFO: Waiting for server reply
2025/03/11 06:25:01 wazuh-agentd: ERROR: SSL read (unable to receive message)
2025/03/11 06:25:01 wazuh-agentd: ERROR: If Agent verification is enabled, agent key and certificates may be incorrect!
after this no agent visible in the wazuh portal, so i have added the agent using /var/ossec/bin/manage_agents and extracted the key. then inserted it on the client server using /var/ossec/bin/manage_agents.
this action added the agent and it went live.
on that time in the ossec log file of wazuh server i saw these errors,
2025/03/11 12:51:05 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:51:15 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:51:25 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:51:35 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:51:45 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:51:55 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:52:05 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:52:15 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:52:25 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 12:54:24 wazuh-maild: ERROR: (1766): DATA not accepted by server
2025/03/11 12:54:24 wazuh-maild: ERROR: (1263): Error Sending email to 127.0.0.1 (smtp server)
2025/03/11 12:59:32 wazuh-remoted: WARNING: Agent key already in use: agent ID '568'
2025/03/11 13:03:11 wazuh-remoted: WARNING: Agent key already in use: agent ID '770'
2025/03/11 13:03:54 wazuh-remoted: WARNING: Agent key already in use: agent ID '568'
2025/03/11 13:04:00 wazuh-maild: ERROR: (1766): DATA not accepted by server
2025/03/11 13:04:00 wazuh-maild: ERROR: (1263): Error Sending email to 127.0.0.1 (smtp server)
2025/03/11 13:06:32 wazuh-remoted: WARNING: Agent key already in use: agent ID '050'
2025/03/11 13:06:42 wazuh-remoted: WARNING: Agent key already in use: agent ID '050'
2025/03/11 13:06:52 wazuh-remoted: WARNING: Agent key already in use: agent ID '050'
2025/03/11 13:07:02 wazuh-remoted: WARNING: Agent key already in use: agent ID '050'
2025/03/11 13:07:13 wazuh-remoted: WARNING: Agent key already in use: agent ID '050'
2025/03/11 13:07:23 wazuh-remoted: WARNING: Agent key already in use: agent ID '050'
2025/03/11 13:07:33 wazuh-remoted: WARNING: Agent key already in use: agent ID '050'
2025/03/11 13:07:35 wazuh-maild: ERROR: (1766): DATA not accepted by server
2025/03/11 13:07:35 wazuh-maild: ERROR: (1263): Error Sending email to 127.0.0.1 (smtp server)
2025/03/11 13:12:40 wazuh-maild: ERROR: (1766): DATA not accepted by server
2025/03/11 13:12:40 wazuh-maild: ERROR: (1263): Error Sending email to 127.0.0.1 (smtp server)
2025/03/11 13:13:40 wazuh-maild: ERROR: (1766): DATA not accepted by server
2025/03/11 13:13:40 wazuh-maild: ERROR: (1263): Error Sending email to 127.0.0.1 (smtp server)
2025/03/11 13:15:02 wazuh-remoted: WARNING: Agent key already in use: agent ID '698'
2025/03/11 13:16:27 wazuh-remoted: WARNING: Agent key already in use: agent ID '568'
2025/03/11 13:16:49 wazuh-remoted: WARNING: Agent key already in use: agent ID '142'
2025/03/11 13:16:59 wazuh-remoted: WARNING: Agent key already in use: agent ID '142'
2025/03/11 13:17:09 wazuh-remoted: WARNING: Agent key already in use: agent ID '142'
2025/03/11 13:17:19 wazuh-remoted: WARNING: Agent key already in use: agent ID '142'