Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Service Auto Start Configuration by API

avatar

Ambari services can be configured to start automatically on system boot. Each service can be configured to start all components, masters and workers, or selectively.

so how to enable all services in ambari cluster to start automatically on system boot by API ?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor
@uri ben-ari

Because there is & symbol in the API call to Shell is taking it differently. So to avoid that please put the whole URL inside Quotation mark as following:

# curl -H "X-Requested-By: ambari" -u admin:admin -X GET "http://localhost:8080/api/v1/clusters/Sandbox/components?fields=ServiceComponentInfo/component_name,ServiceComponentInfo/service_name,ServiceComponentInfo/categoy,ServiceComponentInfo/recovery_enabled,ServiceComponentInfo/total_count&minimal_response=true"

.

View solution in original post

13 REPLIES 13

avatar

now the API runs but not return prompt ( only after ENTER we get prompt )

Michael-Bronson

avatar

capture.png see the PIC above , why after API the Auto-Start Services still disable from the GUI ?

Michael-Bronson

avatar
Master Mentor
@uri ben-ari

Because there is & symbol in the API call to Shell is taking it differently. So to avoid that please put the whole URL inside Quotation mark as following:

# curl -H "X-Requested-By: ambari" -u admin:admin -X GET "http://localhost:8080/api/v1/clusters/Sandbox/components?fields=ServiceComponentInfo/component_name,ServiceComponentInfo/service_name,ServiceComponentInfo/categoy,ServiceComponentInfo/recovery_enabled,ServiceComponentInfo/total_count&minimal_response=true"

.

avatar

another note the components - JournalNode,ZKFailoverController are still disable

Michael-Bronson