Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to delete a host from Ambari-Interface

How to delete a host from Ambari-Interface

Rising Star

Need help cleaning out host in Ambari cluster.

One of my host running master service Zeppelin and Hue crashed and unrecoverable. So we build a new VM and trying to re-register with AMbari and install component again. But I am not able to re-register because it's saying "Host with this name already registered" and I am not able to remove the host because it's saying "It hosts a master service and I need to move it to somewhere else before it can be removed".

new machine has the same name but a changed IP address.

Please advise

Thanks

4 REPLIES 4

Re: How to delete a host from Ambari-Interface

Mentor

you first need to move all services from this host then you can delete host in Ambari. What services is it running, please provide host page screenshot.

Re: How to delete a host from Ambari-Interface

Mentor

Use API to stop service, whether it's is or isn't installed on new node, once stopped, you can run delete call.

Re: How to delete a host from Ambari-Interface

Rising Star

@Artem Ervits

Here is what happened. I rebuild the new box with the same name but new IP and install ambari agent on it.

The moment I installed Ambari, Ambari server recognized it and was showing in the dashboard with the new IP.

Since the new server has no component on it, all was showing as stopped. I remove all but it's not letting me remove the master zeppelin note book. I would like to delete the host and re-add but cannot do that because of this service.

I tried this command below but got the error

curl -u admin1:admin1 -H "X-Requested-By: ambari" -X DELETE  http://hdp-m.asotc:8080/api/v1/clusters/hadoop/hosts/hdp-hue.asotc


}[root@hdp-s2 ~]# curl -u admin1:admin1 -H "X-Requested-By: ambari" -X DELETE http://hdp-m.asotc:8080/api/v1/clusters/hadoop/hosts/hdp-hue.asotc
{
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: An internal system exception occurred: Cannot remove host hdp-hue.asotc from hadoop.  The following roles exist, and these components must be stopped if running, and then deleted: METRICS_MONITOR, ZEPPELIN_MASTER"

Re: How to delete a host from Ambari-Interface

New Contributor
@Prakash Punj

as suggested by @Artem Ervits, You need to stop those 2 services and not delete the host directly by API, First stop the services as given in https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+compon...

and than try to delete the host.