As stated in my problem statement, I am able to reach the agent from the server and vice-versa through the ping command. Also when the agent is active / started I can telnet into the agent's IP Address:16163. Hence the I am ruling out the possibility of firewall in between as there are no firewalls involved on the client side.
WRT HA / Server config: The End Point Address is the public IP (122.181.162.143) of the server and is reachable from outside.
What else could be the problem ... How should I solve this ?
I have never seen this failure when it wasn't one of those two things I mentioned earlier. Therefore, the only thing I can suggest is that you look in the server logs for any types of error messages the server might be logging that we missed.
In addition, you can add this to the <rhq-server-install-dir>/jbossas/server/default/conf/jboss-log4j.xml:
<category name="org.rhq.enterprise.server.core.comm.ServerCommunicationsService"> <priority value="DEBUG"/> </category>
Wait for that change to get hot deployed (server polls for changes every 60 seconds, so it won't take long). Then restart your agent. Look for this to be logged at the DEBUG level and tell us what you see:
"Failed to ping endpoint [<your agent endpoint>]. Cause: <find out what this exception message says>"