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.

configs.sh not supported from 2.6.4 HDP version

Solved Go to solution
Highlighted

configs.sh not supported from 2.6.4 HDP version

hi all,

Until HDP version - 2.6.4 we can use the configs.sh as the following example

( in this example we print all variables that relevant to the config type - yarn-site )

cluster name - HDP

config type - yarn-site

ambari server - localhost

 /var/lib/ambari-server/resources/scripts/configs.sh get localhost HDP yarn-site
########## Performing 'GET' on (Site:yarn-site, Tag:version1512057597218)
"properties" : {
"hadoop.registry.rm.enabled" : "true",
.
.
.

from 2.6.4 version ( and include config.sh isn't supported )

/var/lib/ambari-server/resources/scripts/configs.py get localhost HDP yarn-site
Usage: configs.py [options]
configs.py: error: One of required options is not passed

so we using now the configs.py instead

but seems that flags in configs.sh not as in configs.py

what is the right syntax to use the configs.py in order to get all variable according to the config type as we do on configs.sh ?

 /var/lib/ambari-server/resources/scripts/configs.py get localhost HDP yarn-site
Usage: configs.py [options]
configs.py: error: One of required options is not passed
Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: configs.sh not supported from 2.6.4 HDP version

Super Mentor

@Michael Bronson

Here is a simple example of config.py:

# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=get --host=localhost --cluster=Sandbox --config-type=yarn-site

View solution in original post

6 REPLIES 6
Highlighted

Re: configs.sh not supported from 2.6.4 HDP version

Super Mentor

@Michael Bronson

Here is a simple example of config.py:

# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=get --host=localhost --cluster=Sandbox --config-type=yarn-site

View solution in original post

Highlighted

Re: configs.sh not supported from 2.6.4 HDP version

Super Mentor

@Michael Bronson

Here is another example in which we are setting a property in cluster-env. Notice "-k" means Key and "-v" for value. Following command will set the Auto Start for Cluster services to true.

# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=Sandbox --config-type=cluster-env -k "recovery_enabled" -v "true"

.

Highlighted

Re: configs.sh not supported from 2.6.4 HDP version

@jay thank you , another little equation regrading that

in configs.sh in order to set new value we do that ( for example )

/var/lib/ambari-server/resources/scripts/configs.sh set localhost HDP yarn.timeline-service.recovery.enabled true

what is the syntax for configs.py?

Michael-Bronson
Highlighted

Re: configs.sh not supported from 2.6.4 HDP version

Super Mentor

@Michael Bronson

Yes we can set individual properties as well like following:

# /var/lib/ambari-server/resources/scripts/configs.py --user=admin --password=admin --port=8080 --action=set --host=localhost --cluster=Sandbox --config-type=yarn-site -k "yarn.timeline-service.recovery.enabled" -v "true"

.

Highlighted

Re: configs.sh not supported from 2.6.4 HDP version

New Contributor

@Jay Kumar SenSharma

Hi ,

I am trying to use this in my environment but fails. Its a kerberized environment and SSL enabled. "XXX" is where I replace the right values.

/var/lib/ambari-server/resources/scripts/configs.py --user=admin --password="XXXXXXXXX" --port=8442 --action=get --host="XXX"--cluster="XXX" --config-type=yarn-site 2018-11-14 10:58:36,163 INFO ### Performing "get" content: Traceback (most recent call last): File "/var/lib/ambari-server/resources/scripts/configs.py", line 364, in <module> sys.exit(main()) File "/var/lib/ambari-server/resources/scripts/configs.py", line 350, in main return get_properties(cluster, config_type, action_args, accessor) File "/var/lib/ambari-server/resources/scripts/configs.py", line 260, in get_properties get_config(cluster, config_type, accessor, output) File "/var/lib/ambari-server/resources/scripts/configs.py", line 212, in get_config properties, attributes = get_current_config(cluster, config_type, accessor) File "/var/lib/ambari-server/resources/scripts/configs.py", line 123, in get_current_config config_tag = get_config_tag(cluster, config_type, accessor) File "/var/lib/ambari-server/resources/scripts/configs.py", line 94, in get_config_tag response = accessor(DESIRED_CONFIGS_URL.format(cluster)) File "/var/lib/ambari-server/resources/scripts/configs.py", line 89, in do_request raise Exception('Problem with accessing api. Reason: {0}'.format(exc)) Exception: Problem with accessing api. Reason: ''

Re: configs.sh not supported from 2.6.4 HDP version

@Mayank Bhatt do add "--protocol https --port 8443" options if ambari is running on HTTPS.

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