?This is interesting. Can you try the steps after restart ambari and refreshing 
the browser?

From: Kartik Mathur <kar...@bluedata.com>
Sent: Friday, September 16, 2016 1:33 PM
To: Sumit Mohanty; user@ambari.apache.org
Subject: Re: Unable to delete host from ambari using API (HDP2.4 with Ambari 

No api/v1/hosts give me the same error , host not found.
Can you suggest how to debug this ?


On Fri, Sep 16, 2016 at 12:22 PM, Sumit Mohanty 
<smoha...@hortonworks.com<mailto:smoha...@hortonworks.com>> wrote:
Can you delete from api/v1/hosts too?

Get Outlook for iOS<https://aka.ms/o0ukef>

On Fri, Sep 16, 2016 at 12:15 PM -0700, "Kartik Mathur" 
<kar...@bluedata.com<mailto:kar...@bluedata.com>> wrote:

Hi Sumit thanks for replying , I stopped ambari-agent on the host and restarted 
ambari server now I am getting host not found from UI as well as from the api , 
however I can still see the host on ambari UI.

This is the message from ambari UI

404 status codereceived on DELETE method for API: 

Error message: Not Found

On Fri, Sep 16, 2016 at 8:44 AM, Sumit Mohanty 
<smoha...@hortonworks.com<mailto:smoha...@hortonworks.com>> wrote:

?Have you stopped the agent running on the host? If not then it will 

After stopping the agent, delete the host from api/v1/hosts/<hostname> as well.

From: Kartik Mathur <kar...@bluedata.com<mailto:kar...@bluedata.com>>
Sent: Thursday, September 15, 2016 11:43 PM
To: user@ambari.apache.org<mailto:user@ambari.apache.org>
Subject: Unable to delete host from ambari using API (HDP2.4 with Ambari 2.2)

I have 7 nodes HDP 2.4 with ambari 2.2 cluster -

This is the closest document that I am able to find for deleting host using 

My host has these services running -

1) Zookeeper_server





1) I first decommision data and node manager using this -

curl -u admin:admin -i -H 'X-Requested-By: ambari' -X POST -d '{ 
"RequestInfo":{ "context":"Decommission DataNode", "command":"DECOMMISSION", 
"parameters":{ "slave_type":"DATANODE", "excluded_hosts":"bluedata-69.bdlocal" 
}, "operation_level":{ "level":"HOST_COMPONENT", "cluster_name":"h2" } }, 
"Requests/resource_filters":[ { "service_name":"HDFS", 
"component_name":"NAMENODE" } ] }'

2)Next I stop and delete all components (listed above, which I am successfully 
able to)

3) Strange thing happens after this -

There is a random behavior on ambari UI where we sometimes see this host and 
sometimes not , besides now if I try to delete host from ambari API it gives me 
server error and tells host does not exist!! , however I can still go on UI and 
delete the host.

All I wanted to do is decommision data node and delete a host in a clean way 
using ambari APIs , please assist


Reply via email to