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

ISSUE : Ranger HA fails if admin password is changed to non default password

Error stack :
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 208, in <module>
    RangerAdmin().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_admin.py", line 59, in install
    setup_ranger_admin_passwd_change()
  File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 598, in setup_ranger_admin_passwd_change
    Execute(cmd, environment={'JAVA_HOME': params.java_home, 'RANGER_ADMIN_HOME': params.ranger_home}, user=params.unix_user)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 273, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 71, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 93, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 141, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 294, in _call
    raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'ambari-python-wrap /usr/hdp/current/ranger-admin/db_setup.py -changepassword admin [PROTECTED] [PROTECTED]' returned 1. 2016-12-02 19:34:37,314  [I] DB FLAVOR :MYSQL
2016-12-02 19:34:37,314  [I] --------- Verifying Ranger DB connection ---------
2016-12-02 19:34:37,315  [I] Checking connection..
2016-12-02 19:34:37,315  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://gwy-ravi.ironman.com/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "SELECT version();"
2016-12-02 19:34:37,808  [I] Checking connection passed.
2016-12-02 19:34:37,809  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://gwy-ravi.ironman.com/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = 'DEFAULT_ADMIN_UPDATE' and active = 'Y';"
2016-12-02 19:34:38,268  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://gwy-ravi.ironman.com/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = 'DEFAULT_ADMIN_UPDATE' and active = 'N';"
2016-12-02 19:34:38,727  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://gwy-ravi.ironman.com/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "insert into x_db_version_h (version, inst_at, inst_by, updated_at, updated_by,active) values ('DEFAULT_ADMIN_UPDATE', now(), user(), now(), user(),'N') ;"
2016-12-02 19:34:39,192  [I] Ranger admin default password change request is in process..
Invalid user password
2016-12-02 19:34:49,401  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://gwy-ravi.ironman.com/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "delete from x_db_version_h where version='DEFAULT_ADMIN_UPDATE' and active='N';"
2016-12-02 19:34:49,865  [E] Ranger admin default password change request failed

ROOT CAUSE : This is product defect and engineering are working on a fix

RESOLUTION / WORKAROUND : Set the ranger admin password to " admin " in both Ranger UI and Ambari -> Ranger Configs and retrigger Ranger HA installation. Once installation is complete, we can change the ranger admin password.

914 Views
0 Kudos
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎12-05-2016 11:48 PM
Updated by:
 
Contributors
Top Kudoed Authors