Support Questions

Find answers, ask questions, and share your expertise

Ranger unable to start via ambari


Hi experts,

I am currently trying to start/stop Ranger via ambari and got the below error.

Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/", line 231, in <module> RangerAdmin().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/", line 375, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/", line 89, in start import params File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/", line 138, in <module> cred_validator_file = format('{usersync_home}/native/credValidator.uexe') File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/", line 95, in format return ConfigurationFormatter().format(format_string, args, **result) File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/", line 59, in format result_protected = self.vformat(format_string, args, all_params) File "/usr/lib64/python2.7/", line 549, in vformat result = self._vformat(format_string, args, kwargs, used_args, 2) File "/usr/lib64/python2.7/", line 571, in _vformat obj, arg_used = self.get_field(field_name, args, kwargs) File "/usr/lib64/python2.7/", line 632, in get_field obj = self.get_value(first, args, kwargs) File "/usr/lib64/python2.7/", line 591, in get_value return kwargs[key] File "/usr/lib/python2.6/site-packages/resource_management/core/", line 63, in __getitem__ return self._convert_value(self._dict[name]) KeyError: 'usersync_home'

Any help is much appreciated.




Expert Contributor



This attached log doesn't have more information. can you attach the ranger log file where we can see the errors.



Chethan YM

Cloudera Employee

Hi @ryu ,


Did you make any config changes related to Ranger usersync prior to restarting Ranger from Ambari?

Also, make sure the usersync directory is pointing to the appropriate HDP version in use as shown below,

# ls -l /usr/hdp/current/ranger-usersync
lrwxrwxrwx 1 root root 36 Aug 18 16:19 /usr/hdp/current/ranger-usersync -> /usr/hdp/


Prashanth Vishnu


Hi @pvishnu 
Thanks for the response. So this is a new cluster and ranger was already previously installed on the node so I modified some of the data in the ambari postgres db to make it think that Ranger is already installed.

Is there any documentation on what I should do to make sure that everything is synced up?