@Hpc Good to know that correcting the /etc/hosts entry resolved the issue. Regarding your later query "in the "/etc/hosts" file of each host machine, shall I
only set the hostname of the machine running the ambari-server service,
or shall I also write the hostname of the all hosts?" >>>> Every Node (host) which is part of the cluster need to resolved the hostname of ambari server which is needed for Ambari Server a nd Ambari Agent communication,Also other components as well needs to know the hostname of other clusternodes. For example the NameNode host should be able to resolve the hostnames of DataNodes , Similarly the ResourceManager should be able to resolve the hostname of all the NodeManager hosts ...etc Similarly the ambari service checks runs on different hosts ... So basically you should have the same every node of your cluster to be able to resolve each other. .
... View more