Support Questions
Find answers, ask questions, and share your expertise

Getting 500 status code for HBase component restart

Solved Go to solution

Getting 500 status code for HBase component restart

New Contributor

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

Accepted Solutions

Re: Getting 500 status code for HBase component restart

Expert Contributor

@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

Re: Getting 500 status code for HBase component restart

Expert Contributor

@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

Re: Getting 500 status code for HBase component restart

New Contributor

Thanks that worked!

Re: Getting 500 status code for HBase component restart

Expert Contributor

@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.