Created 06-21-2017 01:03 AM
HDP 2.4.3
SmartSense 1.3.1.0-136
For example,
I got 5 nodes and setup like this cluster firstly.
Hadoop Cluster
/etc/hosts
10.10.x.x MASTER1.hadoop.com master1
10.10.x.x MASTER2.hadoop.com master2
10.10.x.x SLAVE1.hadoop.com slave1
10.10.x.x SLAVE2.hadoop.com slave2
10.10.x.x SLAVE3.hadoop.com slave3
/etc/sysconfig/network
hostname=FQDN for all servers
And installed ambari and hdp with smartsense.
And then changed every node's FQDN name in "/etc/hosts and /etc/sysconfig/network" Uppercase to Lowercase.
ex. MASTER1.hadoop.com -> master1.hadoop.com
But I got these issues from smartsense view.
Hosts registered in Ambari and SmartSense do not match
........ command hostname -f ........
Also returned these results after executed command "hst list-agents"
MASTER1.hadoop.com
master1.hadoop.com
MASTER2.hadoop.com
master2.hadoop.com
SLAVE1.hadoop.com
slave3.hadoop.com
SLAVE2.hadoop.com
slave2.hadoop.com
SLAVE3.hadoop.com
slvae3.hadoop.com
How to delete all upppercase fqdn lists?
Created 06-21-2017 06:19 AM
The issue is caused by mismatch in hostnames in Ambari and Smartsense. You can use below doc to update the name in Ambari
You can also try to deregister and register agent again with below steps
If the host is no more accessible, use CURL command to unregister the host from SmartSense For example,
curl -u admin:admin -X PUT -d "{\"status\":\"UNREGISTERED\"}" http://HST_SERVER:9000/api/v1/agents/<AGENT_HOSTNAME>
In case a node in the HDP cluster is not listed by hst list-agents command, then it can be added to SmartSense using the following command or using Ambari Host UI add Service option:
# hst setup-agent Enter SmartSense Tool Server hostname: HST_SERVER
Created 06-21-2017 01:11 AM
You will need to tell Ambari about hostname changes. Try "ambari-server update-host-names", details here. Without the update other services don't work well either, for example HBase most likely lists 2 times more Region servers etc.
Created 06-21-2017 02:05 AM
Is there a nicely way to clean up old fqdns only from hst? Cause' originally, as I know, hadoop achitecture is handling Uppercase and Lowercase FQDN names well without any issues.
Created 06-21-2017 06:47 AM
Hm,,It's not working.
I run that procedures, and I got same issues.
Duplicated fqdn's Uppercase and Lowercase names still exist.
Backup ambari-db server.
Stop all services
Stop ambari-server
Stop all amabri-agent
ambari-server update-host-names new_hosts.json
After update-host-names completed successfully, I got same return values from hst list-agents
Created 06-21-2017 06:19 AM
The issue is caused by mismatch in hostnames in Ambari and Smartsense. You can use below doc to update the name in Ambari
You can also try to deregister and register agent again with below steps
If the host is no more accessible, use CURL command to unregister the host from SmartSense For example,
curl -u admin:admin -X PUT -d "{\"status\":\"UNREGISTERED\"}" http://HST_SERVER:9000/api/v1/agents/<AGENT_HOSTNAME>
In case a node in the HDP cluster is not listed by hst list-agents command, then it can be added to SmartSense using the following command or using Ambari Host UI add Service option:
# hst setup-agent Enter SmartSense Tool Server hostname: HST_SERVER
Created 06-21-2017 07:08 AM
Thanks, prsingh. I think, CURL command is the correct way to clean delete old fqdn list in HST.
And it works clearly.
Created 06-29-2017 06:17 PM
If the agent node is registered and is available, you can login into that node and use "hst unregister-agent"