Hi German, sorry for the late reply.
That log error is definitely the smoking gun. It means the manager still has a stale registration for ID 018, preventing the "new" agent from communicating correctly. Since the vulnerability module relies on a clean, active connection to report data, this conflict is likely the cause.
Try these steps to clear it up:
Remove the agent on the Manager side: Don't just reinstall the agent software. You need to delete the entry from the manager's database:
Run /var/ossec/bin/manage_agents and use the (R)emove option for ID 018.
Alternatively, use: /var/ossec/bin/agent_control -r -i 018
Restart the Wazuh Manager: This ensures the keys are cleared from memory.
Re-register the Agent: After the manager is back up, register the agent as if it were brand new.
Check Vulnerability Settings: Ensure the <vulnerability-detector> is enabled in your ossec.conf on the manager and that the agent's OS is supported.