Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Auto-Start Services from disable to enable ( in ambari GUI under ADMIN )

Solved Go to solution
Highlighted

Auto-Start Services from disable to enable ( in ambari GUI under ADMIN )

I want to enable the button - Auto-Start Services from disable to enable by API as described in picture2 (capture2), the default status is as described in picture1

* need to set the button to enable - in order to configure all the components as auto start


capture2.pngcapture1.png
Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Auto-Start Services from disable to enable ( in ambari GUI under ADMIN )

Super Mentor

@uri ben-ari

Please try this.

Step1). On the ambari server host run the following command:

# /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin -port 8080 get amb25101.example.com plain_ambari cluster-env  /tmp/cluster-env.txt

.

You should see the file "/tmp/cluster-env.txt" content something like following, NOTICE the "recovery_enabled" is set to "false" (that you need to make as "true")

"properties" : {
"agent_mounts_ignore_list" : "",
"alerts_repeat_tolerance" : "1",
"enable_external_ranger" : "false",
"fetch_nonlocal_groups" : "true",
"hide_yarn_memory_widget" : "false",
"ignore_bad_mounts" : "false",
"ignore_groupsusers_create" : "false",
"kerberos_domain" : "EXAMPLE.COM",
"manage_dirs_on_root" : "true",
"managed_hdfs_resource_property_names" : "",
"one_dir_per_partition" : "false",
"override_uid" : "true",
"recovery_enabled" : "false",
.
.
.

.

Step2). Now edit the file "/tmp/cluster-env.txt" and set the "recovery_enabled" : "true".

.

Step3). Now run the same config.sh command but this time instead of "get" use "set" to set the "recovery_enabled" is set to "true".

# /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin -port 8080 set amb25101.example.com plain_ambari cluster-env  /tmp/cluster-env.txt

.

Step4). refresh the ambari ui and check again the "Auto Recobery Page"

.

Please Change the Following values in the config.sh command

Here in the above command please replace the ambari admin credentials
"amb25101.example.com" replace with your Ambari Server Hostname
"plain_ambari" with your ambari Cluster name.

.

4 REPLIES 4

Re: Auto-Start Services from disable to enable ( in ambari GUI under ADMIN )

Super Mentor

@uri ben-ari

Please try this.

Step1). On the ambari server host run the following command:

# /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin -port 8080 get amb25101.example.com plain_ambari cluster-env  /tmp/cluster-env.txt

.

You should see the file "/tmp/cluster-env.txt" content something like following, NOTICE the "recovery_enabled" is set to "false" (that you need to make as "true")

"properties" : {
"agent_mounts_ignore_list" : "",
"alerts_repeat_tolerance" : "1",
"enable_external_ranger" : "false",
"fetch_nonlocal_groups" : "true",
"hide_yarn_memory_widget" : "false",
"ignore_bad_mounts" : "false",
"ignore_groupsusers_create" : "false",
"kerberos_domain" : "EXAMPLE.COM",
"manage_dirs_on_root" : "true",
"managed_hdfs_resource_property_names" : "",
"one_dir_per_partition" : "false",
"override_uid" : "true",
"recovery_enabled" : "false",
.
.
.

.

Step2). Now edit the file "/tmp/cluster-env.txt" and set the "recovery_enabled" : "true".

.

Step3). Now run the same config.sh command but this time instead of "get" use "set" to set the "recovery_enabled" is set to "true".

# /var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin -port 8080 set amb25101.example.com plain_ambari cluster-env  /tmp/cluster-env.txt

.

Step4). refresh the ambari ui and check again the "Auto Recobery Page"

.

Please Change the Following values in the config.sh command

Here in the above command please replace the ambari admin credentials
"amb25101.example.com" replace with your Ambari Server Hostname
"plain_ambari" with your ambari Cluster name.

.

Re: Auto-Start Services from disable to enable ( in ambari GUI under ADMIN )

is it possible by API to check that button change from disable to enable ?

Michael-Bronson

Re: Auto-Start Services from disable to enable ( in ambari GUI under ADMIN )

when I run the first syntax ( step 1 ) I get - USERID=admin PASSWORD=admin PORT=:8080 [ERROR] "/tmp/cluster-env.txt" not found in server response. [ERROR] Output of `curl -k -s -u admin:admin "http://master.uns.com:8080/api/v1/clusters/cluster-env?fields=Clusters/desired_configs"` is: [ERROR] { "status" : 404, "message" : "The requested resource doesn't exist: Cluster not found, clusterName=cluster-env" }

Michael-Bronson

Re: Auto-Start Services from disable to enable ( in ambari GUI under ADMIN )

Super Mentor

@uri ben-ari

That error you will get only when you have not specified the "Cluster Name" aftaer the ambari server hostname in the config.sh command:

/var/lib/ambari-server/resources/scripts/configs.sh -u admin -p admin -port 8080 get amb25101.example.com plain_ambari cluster-env /tmp/cluster-env.txt

.

Don't have an account?
Coming from Hortonworks? Activate your account here