Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
11-18-2019
10:02 AM
- last edited on
11-18-2019
10:58 AM
by
ask_bill_brooks
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
Created 11-18-2019 01:50 PM
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
Created 11-18-2019 11:21 AM
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
Created 11-18-2019 01:03 PM
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
Created 11-18-2019 01:08 PM
I get also
<p>The requested method DELETE is not allowed for the URL /api/v1/clusters/............/host_components/SPARK2_THRIFTSERVER.</p>
Created 11-18-2019 01:50 PM
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
Created on 11-18-2019 10:43 PM - edited 11-18-2019 10:46 PM
I change it as your advice but still:
curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE "http://node02:8080/api/v1/clusters/HDP/hosts/node01/host_components/SPARK2_THRIFTSERVE"
{
"status" : 404,
"message" : "org.apache.ambari.server.controller.spi.NoSuchResourceException: The specified resource doesn't exist: Service not found, clusterName=HDP, serviceName=component: SPARK2_THRIFTSERVE"
.
.note - spark thrift server is on - node01 and on node 03
its strange because: ( SPARK2_THRIFTSERVER is the component name )
curl -u admin:admin -H "X-Requested-By: ambari"-X GET http://node02:8080/api/v1/clusters/HDP/components/ | grep -i spark | grep component_name | tail -1
"component_name" : "SPARK2_THRIFTSERVER",
Created 11-18-2019 11:07 PM
now it works
I set FQDN , incited just node1
Created 11-18-2019 11:09 PM
@mike_bronson7 The latest command you posted again has typo. "R" is missing at the end in below command -
>>curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE "http://node02:8080/api/v1/clusters/HDP/hosts/node01/host_components/SPARK2_THRIFTSERVE"
Pls try and pass new error if any.