Verify the following prerequisites for Apache Ambari:
Apache Ambari requires certain ports that are open and available during the installation to communicate with the hosts that Apache Ambari deploys and manages. You need to temporarily disable the iptables to meet this requirement.
Verify that you meet the memory and package requirements for Apache Ambari. For more information, see the Hortonworks documentation.