Marcin
Marcin

Reputation: 49846

Ambari remove dead host

I have a host configured into Ambari which no longer exists. Ambari still thinks it's there. When I try to delete it through the UI I get:

400 status code received on DELETE method for API: /api/v1/clusters/handy091015/hosts/r-hadoopeco-celeryworker-07ac46a4.hbinternal.com/host_components/ZOOKEEPER_CLIENT

Error message: Bad Request

When I try to delete it via the api, with the command below, I get the same host information as with a GET:

curl  -H "X-Requested-By: ambari" -DELETE http://admin:[email protected]//api/v1/clusters/handy091015/hosts/r-hadoopeco-celeryworker-07ac46a4.hbinternal.com

I have tried the instructions here to no avail: https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+components+on+a+host

My question is: how do I get Ambari to no longer know about/try to do things with this host.

Upvotes: 0

Views: 2670

Answers (1)

melhior
melhior

Reputation: 139

I am not able to reproduce your behaviour with Ambari 2.1.2 and HDP 2.3 stack.

Limitation: Note that host removing is supported only for hosts with no master components, so if they are present, then deleting is not possible.

Options:

  • Try to do ambari-server restart, sometimes it have intermittent issues
  • If this is an option, I recomend you to do ambari-server reset and install it from scratch. If you don't have much setup, it will save your time probably.
  • If not, you may want to post ambari-server.log file additionally. This may help to debug the core issue
  • Another option - just ignore that host, it will not do much harm to you. You can move it to maintenance mode, that will ease cluster operation.

Upvotes: 1

Related Questions