Community Articles
Find and share helpful community-sourced technical articles
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

SYMPTOM: Ranger is installed and managed using Ambari. Services failed to start and giving below error


Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/HIVE/", line 185, in <module>
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 218, in execute
File "/var/lib/ambari-agent/cache/common-services/HIVE/", line 85, in start
File "/var/lib/ambari-agent/cache/common-services/HIVE/", line 50, in setup_ranger_hive
hdp_version_override = hdp_version) 
File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/", line 82, in setup_ranger_plugin
File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/", line 92, in create_ranger_repository
repo = self.get_repository_by_name_urllib2(repo_name, component, 'true', ambari_username_password_for_ranger)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/", line 57, in get_repository_by_name_urllib2
response = json.loads(
File "/usr/lib/python2.6/site-packages/ambari_simplejson/", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.6/site-packages/ambari_simplejson/", line 335, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.6/site-packages/ambari_simplejson/", line 353, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/", line 108, in create_ranger_repository
raise Fail('Ambari admin username and password are blank ')
resource_management.core.exceptions.Fail: Ambari admin username and password are blank

ROOT CAUSE: This error can occur if the user changes the admin password in the Ranger Web User Interface, but neglects to also change it in Ambari's Ranger configs.

The error message, however, is not very descriptive of what the problem actually is. A bug has been filed against Ambari to provide better error reporting for situations like this:

A fix is scheduled to go into Ambari version 2.1.3 and higher.

RESOLUTION: If the password was indeed changed in the Ranger Web Client but not in Ambari, then:

1) Log in to the Ambari Web User Interface.

2) Click on the Ranger Service.

3) Click on the Configs tab for the Ranger server.

4) Locate the admin_password parameter in Ranger's Advanced ranger-env section.

5) Update the password to match what was entered in the Ranger Web Interface.

6) Save the settings, restart the Ranger service, then restart any services that were failing.

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎12-24-2016 11:25 AM
Updated by:
Top Kudoed Authors