Created 09-30-2021 09:51 AM
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/ranger_admin.py", line 231, in <module> RangerAdmin().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 375, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 89, in start import params File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/params.py", line 138, in <module> cred_validator_file = format('{usersync_home}/native/credValidator.uexe') File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py", line 95, in format return ConfigurationFormatter().format(format_string, args, **result) File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/format.py", line 59, in format result_protected = self.vformat(format_string, args, all_params) File "/usr/lib64/python2.7/string.py", line 549, in vformat result = self._vformat(format_string, args, kwargs, used_args, 2) File "/usr/lib64/python2.7/string.py", line 571, in _vformat obj, arg_used = self.get_field(field_name, args, kwargs) File "/usr/lib64/python2.7/string.py", line 632, in get_field obj = self.get_value(first, args, kwargs) File "/usr/lib64/python2.7/string.py", line 591, in get_value return kwargs[key] File "/usr/lib/python2.6/site-packages/resource_management/core/utils.py", line 63, in __getitem__ return self._convert_value(self._dict[name]) KeyError: 'usersync_home'
Any help is much appreciated.
Thanks,
Created 10-03-2021 09:05 PM
Hi,
This attached log doesn't have more information. can you attach the ranger log file where we can see the errors.
Regards,
Chethan YM
Created 10-06-2021 11:31 PM
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/2.6.5.328-2/ranger-usersync
Thanks,
Prashanth Vishnu
Created 10-07-2021 08:52 AM
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?
Thanks,