Hi Victor,
Thanks for your reply. I did everything you told me, but the error persist. I continuous receiving many logs as below:
ossec-agentd: Failed md5 for: shared/
merged.mg -- deleting.
A new thing that I realized is that the file ar.conf is not present in windows agent installation directory too, I tried to restart the agent remotely and saw it. After I enable debug on the windows agent I was able to see this log:
ossec-agent: DEBUG: Sending keep alive: #!-Microsoft Windows Server 2012 Datacenter Edition (full) (Build 9200) - OSSEC HIDS v2.9.0 / e204e0200d4f36c5c80b071e2e1ef79b
The point is, this checksum is not the same of agent.conf or
merged.mg on ossec server. I kinda gave up about this and tried to do everything manually, I created agent.conf in blank within C:\Program Files (x86)\ossec-agent\shared directory and restart the agent, in the log file the error (ERROR: Error reading XML file 'shared/agent.conf': XMLERR: File 'shared/agent.conf' not found) isn't being shown anymore, but the agent.conf doesn't synchronize, it remains in blank.
I don't know what to do anymore, reinstalled the agent and the server, tried in different windows installations and tried with ossec 2.8.3, but the problem remains. The funny point is that it only happens on Windows agents, on Linux agents everything works perfectly.
If I copy the content of agent.conf from the server to the windows agent, everything works. But I don't know if it can bring me some problem in the future.