For the message you presented; Do you have firewall or network configuration preventing access to that port on that IP? That should be the Cloudera Manager Server, which needs to be running for the agent to connect on that port.
Are you attempting to use the Microsoft app setup interface or are you attempting an installation from scratch on ubuntu OS within Azure?
The heartbeat is dependant on forward and reverse lookup working properly and is consistant between hosts across restart of systems.
There are some specific requirements on type of Azure node, detailed here: