Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
avatar
Expert Contributor

Purpose

Utility helps to collect and compare the hadoop configurations between two or more clusters.

Source

https://github.com/karthikhw/ambari/blob/master/bin/compare.sh

Usage

./compare.sh

Inputs

How many clusters you want to compare :

Ambari Username :

Ambari Password :

Hostname :

Ambari Server Port :

Clustername :

Is ambari URL secure (y/n)? (HTTPS/HTTP):

Note

Run it in ambari server

Service configurations are retrieved from ambari via the curl request.

2,866 Views
Comments

Great one Karthik.

avatar

Hi,


I am trying to leverage this tool to compare my two Hortonworks clusters. The script is not able to fetch the configurations and throwing below error. Any custom changes required for the script?

Exception:

ERROR: THIS SCRIPT IS NO LONGER SUPPORTED. PLEASE USE configs.py INSTEAD


As per the above suggestion, when i try to use the /var/lib/ambari-server/resources/scripts/configs.py python script i am getting below exception again.

Exception:

[*****@******** scripts]$ python configs.py --user=admin --password=***** --port=8443 --action=get --host=********** --cluster=test --config-type=yarn-site --file=/home/admvxb/configs/yarn_site_payload.json

2019-05-14 10:38:05,578 INFO ### Performing "get" content:

2019-05-14 10:38:05,579 INFO ### to file "/home/admvxb/configs/yarn_site_payload.json"

Traceback (most recent call last):

File "configs.py", line 364, in <module>

sys.exit(main())

File "configs.py", line 350, in main

return get_properties(cluster, config_type, action_args, accessor)

File "configs.py", line 260, in get_properties

get_config(cluster, config_type, accessor, output)

File "configs.py", line 212, in get_config

properties, attributes = get_current_config(cluster, config_type, accessor)

File "configs.py", line 123, in get_current_config

config_tag = get_config_tag(cluster, config_type, accessor)

File "configs.py", line 94, in get_config_tag

response = accessor(DESIRED_CONFIGS_URL.format(cluster))

File "configs.py", line 89, in do_request

raise Exception('Problem with accessing api. Reason: {0}'.format(exc))

Exception: Problem with accessing api. Reason: ''


Please help me to compare all my configuration between two of our clusters.

Thanks

Venkat