Support Questions

Find answers, ask questions, and share your expertise

AMBARI REST API to start all the services on an individual node

avatar
Contributor

Hi, I have a 50+ node HDP 2.3 cluster. It so happened that one of the nodes restarted and all the services installed on that node were stopped. Is there a way, a rest api call that I can use to start all the services just on this one particular node

1 ACCEPTED SOLUTION

avatar
Expert Contributor

@Krish Khambadkone

This should work

curl -u admin:admin -H "X-Requested-By:ambari" -X PUT -d '{"HostRoles": {"state": "STARTED"}}' http://AMBARI_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/HOST_ON_WHICH_COMPONENTS_NEED_TO_BE_START...

Components in Maintenance mode will be ignored.

View solution in original post

4 REPLIES 4

avatar
Expert Contributor

@Krish Khambadkone

This should work

curl -u admin:admin -H "X-Requested-By:ambari" -X PUT -d '{"HostRoles": {"state": "STARTED"}}' http://AMBARI_HOST:8080/api/v1/clusters/CLUSTER_NAME/hosts/HOST_ON_WHICH_COMPONENTS_NEED_TO_BE_START...

Components in Maintenance mode will be ignored.

avatar
Contributor

This helped a lot thank you. I was able to run this call from the command line and start the services on this node.

avatar
Expert Contributor
@Krish Khambadkone

Thanks for the confirmation.

Could you please accept the answer?

avatar
Contributor

Dont see any option to accept the answer. Do see that it is marked "Best Answer" does that mean it has been accepted.