1

In my Ambari server I have added seven slaves to the master, But the problem is I had changed the hostnames on slaves, therefore Master Node cannot identify the slaves now.

So can anyone help me to changed those hostnames which are already added?

Thank You.

Madura Dissanayake
  • 8,309
  • 5
  • 25
  • 34

2 Answers2

1

As of Ambari 2.2.2 you can change hostnames using ambari-server update-host-names <hostnames.json>

The basic steps are:

  1. Back up your Ambari DB
  2. Disable Kerberos
  3. Stop ambari-server and ambari-agent on all hosts
  4. Create hostnames.json to map old names to new names. For example: {"clusterName":{"oldhost1.example.com":"newhost1.example.com","oldhost2.example.com":"newhost2.example.com"}}
  5. On Ambari Server: ambari-server update-host-names hostnames.json
  6. Updates hostnames on all nodes
  7. If the hostname of Ambari Server changed, update ambari-agent.ini on every Ambari Agent node
  8. On Ambari Server: ambari-server start
  9. On all Agents: ambari-agent start
  10. Re-enable Kerberos if needed

http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.0/bk_ambari_reference_guide/content/ch_changing_host_names.html

thinkmassive
  • 758
  • 6
  • 15
0

I'm facing a similar problem. What I have found so far is a mechanism for setting up custom hostnames:

https://ambari.apache.org/1.2.3/installing-hadoop-using-ambari/content/ambari-chap7a.html

It should solve the issue of changing hostnames, however I'm afraid it won't be that straightforward because of the first 2 steps:

  1. On the Install Options screen, select Perform Manual Registration for Ambari Agents.
  2. Install the Agents manually as described in Installing Ambari Agents Manually.

which you probably can't retake long after you set up the whole cluster.