Wazuh agent and manager version mismatch

If a newly added agent is not reporting to the Wazuh manager. Check the agent logs to see the error logs.

tail -5f /var/ossec/logs/ossec.log
2025/05/19 15:57:19 wazuh-agentd: INFO: No authentication password provided
2025/05/19 15:57:19 wazuh-agentd: INFO: Using agent name as: node1
2025/05/19 15:57:19 wazuh-agentd: INFO: Waiting for server reply
2025/05/19 15:57:19 wazuh-agentd: ERROR: Agent version must be lower or equal to manager version (from manager)
2025/05/19 15:57:19 wazuh-agentd: ERROR: Unable to add agent (from manager)

As per the logs Wazuh agent is newer than the Wazuh manager, which is not allowed.

/var/ossec/bin/wazuh-agentd -V

The agent version is Wazuh v4.12.0 - Wazuh Inc.

/var/ossec/bin/wazuh-control info

WAZUH_VERSION=”v4.11.2”

The Wazuh manager is running version 4.11.2 and agent is 4.12.0 causing this errors.

To fix this issue, remove the current agent

sudo apt remove wazuh-agent

Install the wazuh agent version 4.11.2

sudo apt install wazuh-agent=4.11.2-1

This will install the Wazuh agent, now navigate to /var/ossec/etc/ directory

Edit the ossec.conf file and replace MANAGER_IP with your Wazuh manager IP for the agent to report to the Wazuh manager.

Enable and start the Wazuh agent service.

sudo systemctl enable wazuh-agent.service

sudo systemctl start wazuh-agent.service