@Udhav You need to map a FQDN (fully qualified domain name) to your "localhost" via /etc/hosts
For example I often use "hdp.cloudera.com".
cat /etc/hosts | grep 'cloudera.com':
Next you put the FQDN in the list of hosts during Cluster Install Wizard. Be sure to complete the next required steps for ssh key, agent setup, etc. When the Confirm Hosts modal fails, you can click the Failed link, open modals and get to the full error.
The easiest way for me to spin up ambari/hadoop in my computer is using AMBARI VAGRANT:
This provides an easy way to spin up 1-X number of nodes in my computer, and it handles all the ssh-keys and host mappings. Using this I can spin up ambari on centos with just a few chained commands:
wget -O /etc/yum.repos.d/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/22.214.171.124/ambari.repo && yum --enablerepo=extras install epel-release -y && yum install java java-devel ambari-server ambari-agent -y && ambari-server setup -s && ambari-server && ambari-server start && ambari-agent start