Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 10-08-2015 01:31 PM
Sometimes when installing Ambari run repos are downloaded or there are maybe issues with python.
Created 10-08-2015 01:54 PM
Which user is ambari running under?
ps aux | grep ambari-server
rpm -qa | grep ambari
Try the following steps: On the master node
ambari-server stop ambari-server reset ambari-agent stop yum erase ambari-server rm -rf /var/lib/ambari-server rm -rf /var/run/ambari-server rm -rf /usr/lib/ambari-server rm -rf /etc/ambari-server rm -rf /var/log/ambari-server rm -rf /usr/lib/python2.6/site-packages/ambari*
Reinstall Ambari server
yum install ambari-server ambari-server start
On each worker node:
ambari-agent stop yum erase ambari-agent rm -rf /var/lib/ambari-agent rm -rf /var/run/ambari-agent rm -rf /usr/lib/amrbari-agent rm -rf /etc/ambari-agent rm -rf /var/log/ambari-agent rm -rf /usr/lib/python2.6/site-packages/ambari*
Then try re-running the install of Ambari Agent
yum install ambari-agent vi /etc/ambari-agent/conf/ambari-agent.ini #Change hostname to Ambari Server ambari-agent start
———————————————
- check logs
/var/log/ambari-agent/ambari-agent.log
/var/log/ambari-server/ambari-server.log
before starting the cluster install, see if the hosts have actually registered themselves (if doing it by updating ambari-agent.ini)
—————————
Troubleshooting
You can start ambari in debug mode to get more detailed aoutput via:
ambari-server start --verbose --debug
# or for short
ambari-server start -v -g
Significant files/directories:
SQL scripts to initialize psql DB
Uninstall Postgres and move the redundant Ambari database file out of the way
yum remove postgres*
userdel -fr postgress
mv /var/lib/pgsql /var/lib/old.pgsql
Created 10-08-2015 01:54 PM
Which user is ambari running under?
ps aux | grep ambari-server
rpm -qa | grep ambari
Try the following steps: On the master node
ambari-server stop ambari-server reset ambari-agent stop yum erase ambari-server rm -rf /var/lib/ambari-server rm -rf /var/run/ambari-server rm -rf /usr/lib/ambari-server rm -rf /etc/ambari-server rm -rf /var/log/ambari-server rm -rf /usr/lib/python2.6/site-packages/ambari*
Reinstall Ambari server
yum install ambari-server ambari-server start
On each worker node:
ambari-agent stop yum erase ambari-agent rm -rf /var/lib/ambari-agent rm -rf /var/run/ambari-agent rm -rf /usr/lib/amrbari-agent rm -rf /etc/ambari-agent rm -rf /var/log/ambari-agent rm -rf /usr/lib/python2.6/site-packages/ambari*
Then try re-running the install of Ambari Agent
yum install ambari-agent vi /etc/ambari-agent/conf/ambari-agent.ini #Change hostname to Ambari Server ambari-agent start
———————————————
- check logs
/var/log/ambari-agent/ambari-agent.log
/var/log/ambari-server/ambari-server.log
before starting the cluster install, see if the hosts have actually registered themselves (if doing it by updating ambari-agent.ini)
—————————
Troubleshooting
You can start ambari in debug mode to get more detailed aoutput via:
ambari-server start --verbose --debug
# or for short
ambari-server start -v -g
Significant files/directories:
SQL scripts to initialize psql DB
Uninstall Postgres and move the redundant Ambari database file out of the way
yum remove postgres*
userdel -fr postgress
mv /var/lib/pgsql /var/lib/old.pgsql
Created 10-10-2015 12:45 PM
https://gist.github.com/nsabharwal/f57bb9e607114833df9b
Important
Ambari reinstall will give you following command while running check during the cluster install. It will save you lot of time
I run with --skip=users
python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent --skip=users
Created 02-24-2016 06:42 PM
Created 06-07-2016 09:51 PM
There you go! Here's the solution to your problem. I struggled with this for like weeks and tried uninstalling and reinstalling over and over and then finally decided to share it here : How to completely remove and uninstall HDP
Created 11-28-2019 12:05 AM
Hi, the link seems broken. Can you share with us the working one? Thanks.
Created 08-03-2016 10:47 AM
I noticed couple of typos. be mindful if you are running them in batch
rm -rf /usr/lib/amrbari-server
rm-rf /usr/lib/python2.6/site-packages/ambari*
Created 11-15-2016 04:48 PM
will your above solution delete the existing HDP installation also ?
Created 02-06-2017 09:58 PM
No it doesn't. You have to run additional scripts to delete HDP
Created 01-29-2018 05:16 AM
One of Powerful clean up by below python script on hadoop , It clean all directory , including user and files
[[email protected]]# python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent INFO:HostCleanup: Killing pid's: [''] INFO:HostCleanup:Deleting packages: [''] INFO:HostCleanup: Deleting users: ['ams', 'ambari-qa', 'yarn', 'mapred', 'tez', 'hbase', 'sqoop', 'oozie', 'falcon', 'flume', 'hive', 'hcat'] INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf ams INFO:HostCleanup:Successfully deleted user: ams INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf ambari-qa INFO:HostCleanup:Successfully deleted user: ambari-qa INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf yarn INFO:HostCleanup:Successfully deleted user: yarn INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf mapred INFO:HostCleanup:Successfully deleted user: mapred INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf tez INFO:HostCleanup:Successfully deleted user: tez INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf hbase INFO:HostCleanup:Successfully deleted user: hbase INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf sqoop INFO:HostCleanup:Successfully deleted user: sqoop INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf oozie INFO:HostCleanup:Successfully deleted user: oozie INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf falcon INFO:HostCleanup:Successfully deleted user: falcon INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf flume INFO:HostCleanup:Successfully deleted user: flume INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf hive INFO:HostCleanup:Successfully deleted user: hive INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh userdel -rf hcat INFO:HostCleanup:Successfully deleted user: hcat INFO:HostCleanup:Executing command: /var/lib/ambari-agent/ambari-sudo.sh groupdel hadoop WARNING:HostCleanup:Cannot delete group : hadoop, groupdel: cannot remove the primary group of user 'hduser' INFO:HostCleanup:Path doesn't exists: /home/ams INFO:HostCleanup:Path doesn't exists: /home/ambari-qa INFO:HostCleanup:Path doesn't exists: /home/yarn INFO:HostCleanup:Path doesn't exists: /home/mapred INFO:HostCleanup:Path doesn't exists: /home/tez INFO:HostCleanup:Path doesn't exists: /home/hbase INFO:HostCleanup:Path doesn't exists: /home/sqoop INFO:HostCleanup:Path doesn't exists: /home/oozie INFO:HostCleanup:Path doesn't exists: /home/falcon INFO:HostCleanup:Path doesn't exists: /home/flume INFO:HostCleanup:Path doesn't exists: /home/hive INFO:HostCleanup:Path doesn't exists: /home/hcat INFO:HostCleanup:Deleting file/folder: /tmp/Jetty_0_0_0_0_60010_master____q3nwom INFO:HostCleanup:Deleting file/folder: /tmp/Jetty_0_0_0_0_34300_mapreduce____.dx7bll INFO:HostCleanup:Deleting file/folder: /tmp/hbase-hbase INFO:HostCleanup:Deleting file/folder: /tmp/Jetty_0_0_0_0_34025_mapreduce____jgsznr INFO:HostCleanup:Deleting file/folder: /tmp/Jetty_centos4_test_com_8088_cluster____.cl0kmf INFO:HostCleanup:Deleting file/folder: /tmp/Jetty_0_0_0_0_8042_node____19tj0x INFO:HostCleanup: Deleting directories: [''] INFO:HostCleanup:Path doesn't exists: INFO:HostCleanup: Deleting repo files: [] INFO:HostCleanup: Erasing alternatives:{'symlink_list': [''], 'target_list': ['']} INFO:HostCleanup:Path doesn't exists: INFO:HostCleanup:Clean-up completed. The output is at /var/lib/ambari-agent/data/hostcleanup.result