Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Getting 500 status code for HBase component restart

avatar

Command run:

curl -u$userName:$passWord -H 'X-Requested-By: ambari' -X POST -d ' { "RequestInfo":{ "command":"RESTART", "context":"Restart HBase client on HOST_NAME", "operation_level":{ "level":"HOST", "cluster_name":CLUSTER_NAME } }, "Requests/resource_filters":[ { "service_name":"HBase", "component_name":"HBase_Client", "hosts":"HOST_NAME_1" } ] }' HOST_NAME:8080/api/v1/clusters/OlatheDev/requests

1 ACCEPTED SOLUTION

avatar
Super Collaborator

@Sanket Korgaonkar

It seems that your API semantics are correct but there is a typo in the service name and component name in the API call.

It should be "HBASE_CLIENT" instead of "Hbase_Client" and "HBASE" instead "Hbase"

Can you retry after making that change and let us know if that worked for you. Below is the API call with the suggested changes. Please replace cluster name and host names as needed

curl -u admin:admin -H 'X-Requested-By: ambari' -X POST -d '{ "RequestInfo":{ "command":"RESTART", "context":"Restart HBase client on c6401.ambari.apache.org", "operation_level":{ "level":"HOST", "cluster_name":"c1" } }, "Requests/resource_filters":[ { "service_name":"HBASE", "component_name":"HBASE_CLIENT", "hosts":"c6401.ambari.apache.org" } ] }' 'http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/requests'

View solution in original post

3 REPLIES 3

avatar
Super Collaborator

@Sanket Korgaonkar

It seems that your API semantics are correct but there is a typo in the service name and component name in the API call.

It should be "HBASE_CLIENT" instead of "Hbase_Client" and "HBASE" instead "Hbase"

Can you retry after making that change and let us know if that worked for you. Below is the API call with the suggested changes. Please replace cluster name and host names as needed

curl -u admin:admin -H 'X-Requested-By: ambari' -X POST -d '{ "RequestInfo":{ "command":"RESTART", "context":"Restart HBase client on c6401.ambari.apache.org", "operation_level":{ "level":"HOST", "cluster_name":"c1" } }, "Requests/resource_filters":[ { "service_name":"HBASE", "component_name":"HBASE_CLIENT", "hosts":"c6401.ambari.apache.org" } ] }' 'http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/requests'

avatar

Thanks that worked!

avatar
Super Collaborator

@Sanket Korgaonkar

I am glad that the suggestion helped you.

Please accept the answer. So it can be a valid verified reference for other people who encounter similar problem in future.