I have had this problem before, and it usually is something very simple that we just overlook. In my case the issue was that the HQ client implementation was picking up the wrong IP for the client, and thus it was getting "Connection refused". Make sure you have the proper IP addresses. If you have to, reinstall the client, and edit the agent.properties file, and make sure the settings are correct.
In case this does not help, I have some advices: make sure the connection between client and server is open and not blocked behind any firewall. Try to telnet to the specified ports on both client and server. The best thing to do would be getting a packet sniffer, like snoop or WireShark and see the exact communication between the two machines.
Hope these help.