Support Questions

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

problems in reinstall ambari 2.1.2.1 and hdp2.2.8.0

avatar
Contributor

Hi Team,

I've followed the below link to uninstall the ambari and hdp (ambari - 2.1.2.1 and hdp - 2.2.8.0)

https://pulsatingtaurus.wordpress.com/2015/02/15/clean-uninstall-hortonworks-hdp-2-2/

After that, I followed below link and completed the steps till 2.3 - Start the Ambari Server section.

http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_Installing_HDP_AMB/content/_start_the_amb...

I'm able to start the ambari-server successfully on the Server1.

But, When I execute the below command on any of my hosts (host1, host2), I'm unable to see the packages related to agents.

[root@host1 ~]# yum search ambari
Loaded plugins: product-id, security, subscription-manager
Setting up Upgrade Process 
No Match for argument: ambari-agent 
No package ambari-agent available. 
No Packages marked for Update

Before un-installation of ambari and hdp... I used to get below output for the same command on all of my hosts (host1, host2).

[root@host1 ~]# yum search ambari 
Loaded plugins: product-id, security, subscription-manager 
============================= N/S Matched: ambari ============================= 
ambari-agent.x86_64 : Ambari Agent 
ambari-metrics-collector.x86_64 : Ambari Metrics Assembly 
ambari-metrics-common.noarch : Ambari Metrics Common 
ambari-metrics-hadoop-sink.x86_64 : Ambari Metrics Assembly 
ambari-metrics-monitor.x86_64 : Ambari Metrics Assembly 
ambari-server.x86_64 : Ambari Server

Please let me know and help me in this regards,

1) How to get agent, metrics etc packages on hosts (host1 & host2)?

2) How to re-install ambari-agents on all hosts?

3) How to re-install HDP using ambari UI freshly (I stopped all the services and then followed the link https://pulsatingtaurus.wordpress.com/2015/02/15/clean-uninstall-hortonworks-hdp-2-2/ to uninstall)?

Regards,

CPAT

1 ACCEPTED SOLUTION

avatar
Master Guru

You haven't cleared Ambari DB. Stop ambari-server and do this

ambari-server reset      # answer yes to all prompts
dropdb -U ambari ambari    # default PW is "bigdata"
ambari-server setup    # continue with Ambari install

View solution in original post

8 REPLIES 8

avatar
Master Guru

@c pat

As per provided information, you have Ambari server up and running. Can you please login to Ambari UI and continue steps mentioned under

http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.0.0/bk_Installing_HDP_AMB/content/_log_in_to_apa...

Please let us know if you face any further issues.

avatar
Contributor

As I'm re-installing the HDP, I'm unable to view the wizard page on Ambari UI screen.

I'm with my old cluster details only.

How can I view the wizard page?

avatar
Contributor

1) How to get agent, metrics etc packages on hosts (host1 & host2)?

I've copied ambari.repo from server to my hosts.

[root@mainserver yum.repos.d]# scp ambari.repo host1.ddns.net:/etc/yum.repos.d/
[root@mainserver yum.repos.d]# scp ambari.repo host2.ddns.net:/etc/yum.repos.d/

Now, I'm able to see agent, metrics etc packages on hosts (host1 & host2).

2) How to re-install ambari-agents on all hosts?

Will go with Manual installation.

3) But, How to re-install HDP from ambari UI freshly using wizard? As I'm seeing my old cluster details on the screen?

avatar
Master Guru

You haven't cleared Ambari DB. Stop ambari-server and do this

ambari-server reset      # answer yes to all prompts
dropdb -U ambari ambari    # default PW is "bigdata"
ambari-server setup    # continue with Ambari install

avatar
Contributor

Thank you for the suggestion.

Actually, I'm using MySQL.

When I've run the below command, It's outputting as

[root@mainserver yum.repos.d]# ambari-server reset

**** WARNING **** You are about to reset and clear the Ambari Server database. This will remove all cluster host and configuration information from the database. You will be required to re-configure the Ambari server and re-run the cluster wizard. 
Are you SURE you want to perform the reset [yes/no] (no)? yes 
ERROR: Exiting with exit code 1. 
REASON: Ambari doesn't support resetting exernal DB automatically. To reset Ambari Server schema you must first drop and then create it using DDL scripts from 
"/var/lib/ambari-server/resources/"

So,

1) I've dropped the databases of ambari, hive, oozie

2) and then dropped the users from all hosts from the root

3) Then I created users , databases and ran the SOURCE /var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql; query.

Please suggest me, is this the right approach for the above error?

avatar
Master Guru

Yes, that's correct. There is also a script /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py which you could use to remove users, and remove folders on each node, but you have already done that manually. You can still run it though. Also make sure to remove hdp-select on each node: "yum remove -y hdp-select". After that you have to recreate Mysql ambari database, and Oozie database if you are using Mysql. After all that, run "ambari-server setup" and "start" and when you open Ambari next time you will be able to create a new cluster.

avatar
Contributor

Thanks. Now I'm able to configure see the page with new cluster.

avatar
Expert Contributor

I struggled through the same issue for pretty long time and then decided to share it here : http://www.yourtechchick.com/hadoop/how-to-completely-remove-and-uninstall-hdp-components-hadoop-uni...

Hope that helps!