Hello Gangadhar,
From the error, the agent is unable to reach the Wazuh manager on enrollment TCP port 1515.
Try to ensure that the agent has network conectivity to the Wazuh server by doing a ping and telnet from the endpoint where the Wazuh agent is installed and also, ensure that there's no firewall restriction between the Wazuh agent and manager e.g.
ping192.168.72.161
telnet192.168.72.1611515
Check that the Wazuh manager service is running, and it's listening on port 1515 by running the below command on the Wazuh server (reference):
ss -tulpn | grep 1515
Also, confirm that you inputted the correct IP address of the Wazuh manager on the agent'sossec.conf file.
You can also check the Wazuh server logs for additional error entries to further troubleshoot the issue: cat /var/ossec/logs/ossec.log | grep -i -E "error|warn"
I also noticed that the Wazuh manager and agent IP seem to be different subnets (192.168.72.x and 10.6.128.x respectively). Kindly verify and ensure that there are no network or routing restrictions between them.
I hope this helps. If you have any other query, do not hesitate to ask.
Best regards.
ss -tulpn | grep 1515