Skip to main content
mike_bronson7
Gold ⭐️⭐️⭐️
Nov 18, 2019 6:02 PM UTC
Solved

cant delete SPARK2_THRIFTSERVER from node01/03 from ambari

 

we have two SPARK2_THRIFTSERVER on node01/03 in our ambari server

we want to delete both SPARK2_THRIFTSERVER on both nodes

we try the following API , but without success , any idea where we are wrong?

 

component_name : SPARK2_THRIFTSERVER

 

the REST API: ( we try to delete the thrift server on one of the nodes )

 


curl -iv -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://node02:8080/api/v1/clusters/HDP/hosts/node01/SPARK2_THRIFTSERVER


* About to connect() to node02 port 8080 (#0)
* Connected to node02 (45.3.23.4) port 8080 (#0)
* Server auth using Basic with user 'admin'
> DELETE /api/v1/clusters/HDP/hosts/node01/SPARK2_THRIFTSERVER HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.29.0
> Accept: */*
> X-Requested-By: ambari
>
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found

 

Shelton
SheltonAnswer
Gold ⭐️⭐️⭐️
Nov 18, 2019 9:50 PM UTC

@mike_bronson7 

I see the difference in the response of the CURL.

HTTP/1.1 404 Not Found                                            [Before]
HTTP/1.1 405 Method Not Allowed                     [Now]

 

I have just tried on my cluster without the -i v and it worked

Worked for me right now

curl  -u admin:admin -H "X-Requested-By: ambari" -X DELETE "http://node02:8080/api/v1/clusters/HDP/hosts/node01/host_components/SPARK2_THRIFTSERVER"

 

Seen a case where with only a -i
curl -i -u admin:admin -H "X-Requested-By: ambari" -X DELETE "http://node02:8080/api/v1/clusters/HDP/hosts/node01/host_components/SPARK2_THRIFTSERVER"

Please revert 

 

7 replies

Shelton
Gold ⭐️⭐️⭐️
Nov 18, 2019 7:21 PM UTC

@mike_bronson7 

 

It looks like you forgot a parameter  host_components  assuming the ambari server is running on node2 and the thrift Server is on node01 and node02

 

Delete on Node1

curl -iv -u admin:admin -H "X-Requested-By: ambari" -X DELETE "http://node02:8080/api/v1/clusters/HDP/hosts/node01/host_components/SPARK2_THRIFTSERVER"

 

Delete on Node 2 

curl -iv -u admin:admin -H "X-Requested-By: ambari" -X DELETE

"http://node02:8080/api/v1/clusters/HDP/hosts/node02/host_components/SPARK2_THRIFTSERVER"

HTH

Translate
mike_bronson7
Gold ⭐️⭐️⭐️
Nov 18, 2019 9:03 PM UTC

yes I did it ( i forget to write it in my post ( but cant edit the post )

so after I run it as you wrote still with the same problem

 

< HTTP/1.1 405 Method Not Allowed
HTTP/1.1 405 Method Not Allowed

Translate
Michael-Bronson
mike_bronson7
Gold ⭐️⭐️⭐️
Nov 18, 2019 9:08 PM UTC

I get also

 

<p>The requested method DELETE is not allowed for the URL /api/v1/clusters/............/host_components/SPARK2_THRIFTSERVER.</p>

Translate
Michael-Bronson