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.

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