Support Questions

Find answers, ask questions, and share your expertise

How to remove Falcon service from Ambari?

Hi Team,

Can anyone please provide me steps to remove Falcon service using Ambari or CLI?

1 ACCEPTED SOLUTION

@Sridhar Bandaru

Try the below template,

curl -H "X-Requested-By:ambari" -u admin:<Ambari_Password> DELETE \ http://<Ambari_Host>:Port>/api/v1/clusters/<Cluster_Name>/hosts/<Host_Name_Where_FALCON_Installed>/host_components/FALCON_SERVER

Eg,

curl -H "X-Requested-By:ambari" -u admin:admin -X DELETE http://sandbox1.demo.sas.com:8080/api/v1/clusters/sandbox/hosts/sandbox1.demo.sas.com/host_component...

The above command doesn’t give any output.

so to confirm , run the same command again and it shows that the component doesn’t exist as below.

{ "status" : 404, "message" : "org.apache.ambari.server.controller.spi.NoSuchResourceException: The specified resource doesn't exist: ServiceComponentHost not found, clusterName=splsandbox, serviceName=FALCON, serviceComponentName=FALCON_SERVER, hostName=splsandbox1.demo.sas.com" }

Hope this helps

View solution in original post

4 REPLIES 4

You can delete a service with the REST API through ambari. You will need to stop the service first, then use the following command:

curl -u admin:admin -i -H 'X-Requested-By: ambari' -X DELETE http://sandbox.hortonworks.com:8080/api/v1/clusters/Sandbox/services/FALCON

Its throwing error:

HTTP/1.1 405 Http method DELETE is not supported by this URL

Contributor

@Sridhar Bandaru

It would be a good idea to create a backup of the Ambari database before proceeding.

http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.0/bk_ambari_reference_guide/content/_back_up_c...

Please check the response you are getting when you run the below command.

# curl -u admin:admin -i -H 'X-Requested-By: ambari' -X GET http://sandbox.hortonworks.com:8080/api/v1/clusters/Sandbox/services/FALCON

@Sridhar Bandaru

Try the below template,

curl -H "X-Requested-By:ambari" -u admin:<Ambari_Password> DELETE \ http://<Ambari_Host>:Port>/api/v1/clusters/<Cluster_Name>/hosts/<Host_Name_Where_FALCON_Installed>/host_components/FALCON_SERVER

Eg,

curl -H "X-Requested-By:ambari" -u admin:admin -X DELETE http://sandbox1.demo.sas.com:8080/api/v1/clusters/sandbox/hosts/sandbox1.demo.sas.com/host_component...

The above command doesn’t give any output.

so to confirm , run the same command again and it shows that the component doesn’t exist as below.

{ "status" : 404, "message" : "org.apache.ambari.server.controller.spi.NoSuchResourceException: The specified resource doesn't exist: ServiceComponentHost not found, clusterName=splsandbox, serviceName=FALCON, serviceComponentName=FALCON_SERVER, hostName=splsandbox1.demo.sas.com" }

Hope this helps