Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Changing IP and Hostname for Ambari Eco System

avatar
New Contributor

Hi All, I have a fresh Ambari eco system installed in my VMware Vsphere, assume its hostname is ambari01.example.com and IP Address is 192.168.1.10, I cloned it to ambari02 and changed IP 192.168.1.11. but unable to start services in ambari02.example, I think all eco system configuration files need to be modified, but not sure what all the files need to be modified. Might be some guys already tried this, can someone assist me. Thanks Niruu

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Niruu 

Here is a link changing ambari hostnames that should help you. I have used it successfully before but there are 2 hidden undocumented caveats, you should manually change the hostname in the ambari.properties there should be 2 or 3 properties to match the new VM hostname and also run some SQL like alter in the ambari, ranger, oozi, hive  databases you have to do this for all the fore mentioned components.


The contents of your host_names_changes.json should look like below make sure you have the correct cluster name, you will be prompted if you have already backed up your database etc in my case I usually  just accept , with a VM you can easily create another snapshot and you are good to go.

You must have completely stopped ambari and the agents 

host_names_changes.json

 

{
"cluster1" : {
"ambari01.example.com" : "ambari02.example.com"
}
}

 

 

The command should look like this 

# ambari-server update-host-names  + host_names_changes.json

 

# ambari-server update-host-names host_names_changes.json

 

After completion, you should see successful
Note :

Remember to update the ambari-agent.ini to point to the new ambari02.example.com

 

If you use the above document you could stop on number 8 you don't need to format you Zk

For ambari database I am assuming you are using MariaDB or Mysql

 

mysql -u <ambari_user> -p<ambari_user_password>

GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'<new_FQDN_new_VM>';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'<new_FQDN_new_VM>' IDENTIFIED BY '<ambari_user_password>';

 

Hive to that for all the rest

 

mysql -u <hive_user> -p<hive_user_password>

GRANT ALL PRIVILEGES ON *.* TO 'hive'@'<new_FQDN_new_VM>';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'<new_FQDN_new_VM>' IDENTIFIED BY '<hive_user_password>';

Hope that helps 

Happy hadooping

 

 

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@Niruu 

Here is a link changing ambari hostnames that should help you. I have used it successfully before but there are 2 hidden undocumented caveats, you should manually change the hostname in the ambari.properties there should be 2 or 3 properties to match the new VM hostname and also run some SQL like alter in the ambari, ranger, oozi, hive  databases you have to do this for all the fore mentioned components.


The contents of your host_names_changes.json should look like below make sure you have the correct cluster name, you will be prompted if you have already backed up your database etc in my case I usually  just accept , with a VM you can easily create another snapshot and you are good to go.

You must have completely stopped ambari and the agents 

host_names_changes.json

 

{
"cluster1" : {
"ambari01.example.com" : "ambari02.example.com"
}
}

 

 

The command should look like this 

# ambari-server update-host-names  + host_names_changes.json

 

# ambari-server update-host-names host_names_changes.json

 

After completion, you should see successful
Note :

Remember to update the ambari-agent.ini to point to the new ambari02.example.com

 

If you use the above document you could stop on number 8 you don't need to format you Zk

For ambari database I am assuming you are using MariaDB or Mysql

 

mysql -u <ambari_user> -p<ambari_user_password>

GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'<new_FQDN_new_VM>';
GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'<new_FQDN_new_VM>' IDENTIFIED BY '<ambari_user_password>';

 

Hive to that for all the rest

 

mysql -u <hive_user> -p<hive_user_password>

GRANT ALL PRIVILEGES ON *.* TO 'hive'@'<new_FQDN_new_VM>';
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'<new_FQDN_new_VM>' IDENTIFIED BY '<hive_user_password>';

Hope that helps 

Happy hadooping

 

 

avatar
New Contributor

Shelton - Thank you very much

I will give a try and post the update.

 

Thanks

Niruu

avatar
New Contributor

Hi Shelton,

 

Tons of thanks for you, you saved my whole weekend, Ambari is started as expected.. 🙂

 

Thanks

Niranjan