This could be due to several reasons. But, for me, it turns out to be firewall issue. Disabling firewall on the agent machine solved the issue.