Looks like two hosts originally registered with all CAPS. HADOOP01.BIGDATA.LOCAL HADOOP02.BIGDATA.LOCAL
Does hostname -f or socket.getfqdn() [python] return names in all CAPS? Ambari 2.0 code is converting host names to lower and that could be the reason for mismatch. The work-around is to use the custom hostname script option for the agents. How to: To echo the customized name of the host to which the Ambari agent registers, for every host, create a script like the following example, named
 /var/lib/ambari-agent/hostname.sh. Be sure to chmod the script so it is executable by the Agent. #!/bin/sh
 echo <ambari_hostname> where <ambari_hostname> is the host name to use for Agent registration. Open /etc/ambari-agent/conf/ambari-agent.ini on every host, using a text editor. Add to the [agent] section the following line: hostname_script=/var/lib/ambari-agent/hostname.sh where /var/lib/ambari-agent/hostname.sh is the name of your custom echo script. To generate a public host name for every host, create a script like the following example, named var/lib/ambari-agent/public_hostname.sh to show the name for that host in the UI. Be sure to chmod the script so it is executable by the Agent. #!/bin/sh <hostname> -f where <hostname> is the host name to use for Agent registration. Open /etc/ambari-agent/conf/ambari-agent.ini on every host, using a text editor. Add to the [agent] section the following line: public_hostname_script=/var/lib/ambari-agent/public_hostname.sh Restart the Agent on every host for these changes to take effect. ambari-agent restart -Sumit ________________________________________ From: Frank Eisenhauer <[email protected]> Sent: Friday, April 17, 2015 9:37 AM To: [email protected] Subject: Re: No Heartbeat after upgrade to Ambari 2.0 Sure. Please find the output attached. The configuration worked without any problems in Ambari 1.7 [root@***** ~]# curl -u admin:***** -H "X-Requested-By: ambari" -X GET http://localhost:8080/api/v1/hosts { "href" : "http://localhost:8080/api/v1/hosts", "items" : [ { "href" : "http://localhost:8080/api/v1/hosts/HADOOP03.BIGDATA.LOCAL", "Hosts" : { "host_name" : "HADOOP03.BIGDATA.LOCAL" } }, { "href" : "http://localhost:8080/api/v1/hosts/hadoop02.bigdata.local", "Hosts" : { "host_name" : "hadoop02.bigdata.local" } }, { "href" : "http://localhost:8080/api/v1/hosts/hadoop01.bigdata.local", "Hosts" : { "host_name" : "hadoop01.bigdata.local" } }, { "href" : "http://localhost:8080/api/v1/hosts/HADOOP01.BIGDATA.LOCAL", "Hosts" : { "cluster_name" : "BIGDATA_LAB", "host_name" : "HADOOP01.BIGDATA.LOCAL" } }, { "href" : "http://localhost:8080/api/v1/hosts/HADOOP02.BIGDATA.LOCAL", "Hosts" : { "cluster_name" : "BIGDATA_LAB", "host_name" : "HADOOP02.BIGDATA.LOCAL" } }, { "href" : "http://localhost:8080/api/v1/hosts/hadoop03.bigdata.local", "Hosts" : { "cluster_name" : "BIGDATA_LAB", "host_name" : "hadoop03.bigdata.local" } } ] } [root@********* ~]# curl -u admin:***** -H "X-Requested-By: ambari" -X GET http://localhost:8080/api/v1/clusters/BIGDATA_LAB/hosts { "href" : "http://localhost:8080/api/v1/clusters/BIGDATA_LAB/hosts", "items" : [ { "href" : "http://localhost:8080/api/v1/clusters/BIGDATA_LAB/hosts/HADOOP01.BIGDATA.LOCAL", "Hosts" : { "cluster_name" : "BIGDATA_LAB", "host_name" : "HADOOP01.BIGDATA.LOCAL" } }, { "href" : "http://localhost:8080/api/v1/clusters/BIGDATA_LAB/hosts/HADOOP02.BIGDATA.LOCAL", "Hosts" : { "cluster_name" : "BIGDATA_LAB", "host_name" : "HADOOP02.BIGDATA.LOCAL" } }, { "href" : "http://localhost:8080/api/v1/clusters/BIGDATA_LAB/hosts/hadoop03.bigdata.local", "Hosts" : { "cluster_name" : "BIGDATA_LAB", "host_name" : "hadoop03.bigdata.local" } } ] Am 17.04.2015 um 17:50 schrieb Sumit Mohanty: > curl -u admin:admin -H "X-Requested-By: ambari" -X > GEThttp://localhost:8080/api/v1/hosts
