Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 09-11-2017 12:42 PM
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
Created 09-11-2017 01:01 PM
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.
.
Created 09-11-2017 01:01 PM
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.
.
Created 09-11-2017 02:19 PM
is it possible by API to check that button change from disable to enable ?
Created 09-11-2017 06:47 PM
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" }
Created 09-11-2017 06:51 PM
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