Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ranger Installation Error on HDP 2.5

Ranger Installation Error on HDP 2.5

New Contributor

Getting below error while installing ranger on HDP 2.5

stderr: 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 50, in install setup_ranger_db() File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 230, in setup_ranger_db 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' returned 1. 2016-10-25 14:30:09,850 [I] DB FLAVOR :MYSQL 2016-10-25 14:30:09,851 [I] --------- Verifying Ranger DB connection --------- 2016-10-25 14:30:09,851 [I] Checking connection.. 2016-10-25 14:30:09,851 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "SELECT version();" 2016-10-25 14:30:11,143 [I] Checking connection passed. 2016-10-25 14:30:11,143 [I] --------- Verifying Ranger DB tables --------- 2016-10-25 14:30:11,143 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "show tables like 'x_portal_user';" 2016-10-25 14:30:12,292 [I] Table x_portal_user already exists in database 'ranger_db' 2016-10-25 14:30:12,292 [I] --------- Verifying upgrade history table --------- 2016-10-25 14:30:12,292 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "show tables like 'x_db_version_h';" 2016-10-25 14:30:14,213 [I] Table x_db_version_h already exists in database 'ranger_db' 2016-10-25 14:30:14,213 [I] --------- Applying Ranger DB patches --------- 2016-10-25 14:30:14,213 [I] Executing patch on ranger_db from file: 001-groupsource.sql 2016-10-25 14:30:14,213 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = '001' and active = 'Y';" 2016-10-25 14:30:15,857 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = '001' and active = 'N';" 2016-10-25 14:30:16,960 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "insert into x_db_version_h (version, inst_at, inst_by, updated_at, updated_by,active) values ('001', now(), user(), now(), user(),'N') ;" 2016-10-25 14:30:17,964 [I] Patch 001-groupsource.sql is being applied.. 2016-10-25 14:30:17,964 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -input /usr/hdp/current/ranger-admin/db/mysql/patches/001-groupsource.sql Error executing: drop procedure if exists add_group_source_column_to_x_group_table; java.sql.SQLException: Cannot load from mysql.proc. The table is probably corrupted SQLException : SQL state: HY000 java.sql.SQLException: Cannot load from mysql.proc. The table is probably corrupted ErrorCode: 1728 2016-10-25 14:30:18,975 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "delete from x_db_version_h where version='001' and active='N';" 2016-10-25 14:30:20,655 [E] 001-groupsource.sql import failed! stdout: 2016-10-25 14:29:50,316 - The hadoop conf dir /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for version 2.5.0.0-1245 2016-10-25 14:29:50,317 - Checking if need to create versioned conf dir /etc/hadoop/2.5.0.0-1245/0 2016-10-25 14:29:50,319 - call[('ambari-python-wrap', u'/usr/bin/conf-select', 'create-conf-dir', '--package', 'hadoop', '--stack-version', '2.5.0.0-1245', '--conf-version', '0')] {'logoutput': False, 'sudo': True, 'quiet': False, 'stderr': -1} 2016-10-25 14:29:50,378 - call returned (1, '/etc/hadoop/2.5.0.0-1245/0 exist already', '') 2016-10-25 14:29:50,379 - checked_call[('ambari-python-wrap', u'/usr/bin/conf-select', 'set-conf-dir', '--package', 'hadoop', '--stack-version', '2.5.0.0-1245', '--conf-version', '0')] {'logoutput': False, 'sudo': True, 'quiet': False} 2016-10-25 14:29:50,433 - checked_call returned (0, '') 2016-10-25 14:29:50,434 - Ensuring that hadoop has the correct symlink structure 2016-10-25 14:29:50,434 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf 2016-10-25 14:29:50,435 - Group['solr'] {} 2016-10-25 14:29:50,437 - Group['ranger'] {} 2016-10-25 14:29:50,437 - Group['hadoop'] {} 2016-10-25 14:29:50,437 - Group['users'] {} 2016-10-25 14:29:50,437 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,438 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,439 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,440 - User['ranger'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'ranger']} 2016-10-25 14:29:50,440 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']} 2016-10-25 14:29:50,441 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']} 2016-10-25 14:29:50,442 - User['solr'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,442 - User['kafka'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,443 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,481 - User['sqoop'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,482 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,482 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,483 - User['hbase'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,484 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']} 2016-10-25 14:29:50,484 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555} 2016-10-25 14:29:50,486 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'} 2016-10-25 14:29:50,576 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if 2016-10-25 14:29:50,577 - Directory['/tmp/hbase-hbase'] {'owner': 'hbase', 'create_parents': True, 'mode': 0775, 'cd_access': 'a'} 2016-10-25 14:29:50,578 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555} 2016-10-25 14:29:50,579 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] {'not_if': '(test $(id -u hbase) -gt 1000) || (false)'} 2016-10-25 14:29:50,689 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] due to not_if 2016-10-25 14:29:50,690 - Group['hdfs'] {} 2016-10-25 14:29:50,690 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': [u'hadoop', u'hdfs']} 2016-10-25 14:29:50,692 - FS Type: 2016-10-25 14:29:50,692 - Directory['/etc/hadoop'] {'mode': 0755} 2016-10-25 14:29:50,834 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'root', 'group': 'hadoop'} 2016-10-25 14:29:50,835 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777} 2016-10-25 14:29:51,020 - Initializing 3 repositories 2016-10-25 14:29:51,021 - Repository['HDP-2.5'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0', 'action': ['create'], 'components': [u'HDP', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP', 'mirror_list': None} 2016-10-25 14:29:51,079 - File['/etc/yum.repos.d/HDP.repo'] {'content': '[HDP-2.5]\nname=HDP-2.5\nbaseurl=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.5.0.0\n\npath=/\nenabled=1\ngpgcheck=0'} 2016-10-25 14:29:51,080 - Repository['HDP-UTILS-1.1.0.21'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7', 'action': ['create'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-UTILS', 'mirror_list': None} 2016-10-25 14:29:51,135 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': '[HDP-UTILS-1.1.0.21]\nname=HDP-UTILS-1.1.0.21\nbaseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/centos7\n\npath=/\nenabled=1\ngpgcheck=0'} 2016-10-25 14:29:51,136 - Repository['HDP-SOLR-2.5-100'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos7/', 'action': ['create'], 'components': [u'HDP-SOLR', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-SOLR', 'mirror_list': None} 2016-10-25 14:29:51,141 - File['/etc/yum.repos.d/HDP-SOLR.repo'] {'content': '[HDP-SOLR-2.5-100]\nname=HDP-SOLR-2.5-100\nbaseurl=http://public-repo-1.hortonworks.com/HDP-SOLR-2.5-100/repos/centos7/\n\npath=/\nenabled=1\ngpgcheck=0'} 2016-10-25 14:29:51,154 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2016-10-25 14:29:51,855 - Skipping installation of existing package unzip 2016-10-25 14:29:51,855 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2016-10-25 14:29:51,969 - Skipping installation of existing package curl 2016-10-25 14:29:51,970 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2016-10-25 14:29:52,058 - Skipping installation of existing package hdp-select 2016-10-25 14:29:52,802 - Version 2.5.0.0-1245 was provided as effective cluster version. Using package version 2_5_0_0_1245 2016-10-25 14:29:52,803 - Package['ranger_2_5_0_0_1245-admin'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2016-10-25 14:29:53,072 - Skipping installation of existing package ranger_2_5_0_0_1245-admin 2016-10-25 14:29:53,073 - Version 2.5.0.0-1245 was provided as effective cluster version. Using package version 2_5_0_0_1245 2016-10-25 14:29:53,074 - Package['ranger_2_5_0_0_1245-usersync'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2016-10-25 14:29:53,098 - Skipping installation of existing package ranger_2_5_0_0_1245-usersync 2016-10-25 14:29:53,099 - Version 2.5.0.0-1245 was provided as effective cluster version. Using package version 2_5_0_0_1245 2016-10-25 14:29:53,099 - Package['ranger_2_5_0_0_1245-tagsync'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2016-10-25 14:29:53,136 - Skipping installation of existing package ranger_2_5_0_0_1245-tagsync 2016-10-25 14:29:53,137 - Version 2.5.0.0-1245 was provided as effective cluster version. Using package version 2_5_0_0_1245 2016-10-25 14:29:53,138 - Package['ambari-infra-solr-client'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2016-10-25 14:29:53,162 - Skipping installation of existing package ambari-infra-solr-client 2016-10-25 14:29:53,163 - Stack Feature Version Info: stack_version=2.5, version=2.5.0.0-1245, current_cluster_version=2.5.0.0-1245 -> 2.5.0.0-1245 2016-10-25 14:29:53,206 - File['/usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar'] {'action': ['delete']} 2016-10-25 14:29:53,207 - Deleting File['/usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar'] 2016-10-25 14:29:53,208 - File['/var/lib/ambari-agent/tmp/mysql-connector-java.jar'] {'content': DownloadSource('http://vm-hadoop-m1.fhills.local:8080/resources//mysql-connector-java.jar'), 'mode': 0644} 2016-10-25 14:29:53,208 - Not downloading the file from http://vm-hadoop-m1.fhills.local:8080/resources//mysql-connector-java.jar, because /var/lib/ambari-agent/tmp/mysql-connector-java.jar already exists 2016-10-25 14:29:53,209 - Execute[('cp', '--remove-destination', u'/var/lib/ambari-agent/tmp/mysql-connector-java.jar', u'/usr/hdp/2.5.0.0-1245/ranger-admin/ews/lib')] {'path': ['/bin', '/usr/bin/'], 'sudo': True} 2016-10-25 14:29:53,237 - File['/usr/hdp/2.5.0.0-1245/ranger-admin/ews/lib/mysql-connector-java.jar'] {'mode': 0644} 2016-10-25 14:29:53,237 - ModifyPropertiesFile['/usr/hdp/2.5.0.0-1245/ranger-admin/install.properties'] {'owner': 'ranger', 'properties': ...} 2016-10-25 14:29:53,238 - Modifying existing properties file: /usr/hdp/2.5.0.0-1245/ranger-admin/install.properties 2016-10-25 14:29:53,258 - File['/usr/hdp/2.5.0.0-1245/ranger-admin/install.properties'] {'owner': 'ranger', 'content': ..., 'group': None, 'mode': None, 'encoding': 'utf-8'} 2016-10-25 14:29:53,258 - Writing File['/usr/hdp/2.5.0.0-1245/ranger-admin/install.properties'] because contents don't match 2016-10-25 14:29:53,259 - ModifyPropertiesFile['/usr/hdp/2.5.0.0-1245/ranger-admin/install.properties'] {'owner': 'ranger', 'properties': {'SQL_CONNECTOR_JAR': u'/usr/hdp/2.5.0.0-1245/ranger-admin/ews/lib/mysql-connector-java.jar'}} 2016-10-25 14:29:53,259 - Modifying existing properties file: /usr/hdp/2.5.0.0-1245/ranger-admin/install.properties 2016-10-25 14:29:53,261 - File['/usr/hdp/2.5.0.0-1245/ranger-admin/install.properties'] {'owner': 'ranger', 'content': ..., 'group': None, 'mode': None, 'encoding': 'utf-8'} 2016-10-25 14:29:53,261 - Writing File['/usr/hdp/2.5.0.0-1245/ranger-admin/install.properties'] because contents don't match 2016-10-25 14:29:53,283 - ModifyPropertiesFile['/usr/hdp/current/ranger-admin/install.properties'] {'owner': 'ranger', 'properties': {'audit_store': u'solr'}} 2016-10-25 14:29:53,284 - Modifying existing properties file: /usr/hdp/current/ranger-admin/install.properties 2016-10-25 14:29:53,285 - File['/usr/hdp/current/ranger-admin/install.properties'] {'owner': 'ranger', 'content': ..., 'group': None, 'mode': None, 'encoding': 'utf-8'} 2016-10-25 14:29:53,285 - Writing File['/usr/hdp/current/ranger-admin/install.properties'] because contents don't match 2016-10-25 14:29:53,296 - Setting up Ranger DB and DB User 2016-10-25 14:29:53,296 - Execute['ambari-python-wrap /usr/hdp/current/ranger-admin/dba_script.py -q'] {'logoutput': True, 'environment': {'RANGER_ADMIN_HOME': u'/usr/hdp/current/ranger-admin', 'JAVA_HOME': u'/usr/jdk64/jdk1.8.0_77'}, 'user': 'ranger'} 2016-10-25 14:29:53,678 [I] Running DBA setup script. QuiteMode:True 2016-10-25 14:29:53,679 [I] Using Java:/usr/jdk64/jdk1.8.0_77/bin/java 2016-10-25 14:29:53,679 [I] DB FLAVOR:MYSQL 2016-10-25 14:29:53,679 [I] DB Host:vm-hadoop-m1.fhills.local 2016-10-25 14:29:53,679 [I] ---------- Verifying DB root password ---------- 2016-10-25 14:29:53,679 [I] DBA root user password validated 2016-10-25 14:29:53,679 [I] ---------- Verifying Ranger Admin db user password ---------- 2016-10-25 14:29:53,679 [I] admin user password validated 2016-10-25 14:29:53,679 [I] ---------- Creating Ranger Admin db user ---------- 2016-10-25 14:29:53,679 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "SELECT version();" 2016-10-25 14:29:54,422 [I] Verifying user admin for Host % 2016-10-25 14:29:54,422 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='admin' and host='%';" 2016-10-25 14:29:55,454 [I] MySQL user admin already exists for host % 2016-10-25 14:29:55,454 [I] Verifying user admin for Host localhost 2016-10-25 14:29:55,455 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='admin' and host='localhost';" 2016-10-25 14:29:56,344 [I] MySQL user admin already exists for host localhost 2016-10-25 14:29:56,344 [I] Verifying user admin for Host vm-hadoop-m1.fhills.local 2016-10-25 14:29:56,344 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='admin' and host='vm-hadoop-m1.fhills.local';" 2016-10-25 14:29:57,385 [I] MySQL user admin already exists for host vm-hadoop-m1.fhills.local 2016-10-25 14:29:57,385 [I] ---------- Creating Ranger Admin database ---------- 2016-10-25 14:29:57,386 [I] Verifying database ranger_db 2016-10-25 14:29:57,386 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "show databases like 'ranger_db';" 2016-10-25 14:29:58,066 [I] Database ranger_db already exists. 2016-10-25 14:29:58,066 [I] ---------- Granting permission to Ranger Admin db user ---------- 2016-10-25 14:29:58,066 [I] ---------- Granting privileges TO user 'admin'@'%' on db 'ranger_db'---------- 2016-10-25 14:29:58,066 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "grant all privileges on ranger_db.* to 'admin'@'%' with grant option;" 2016-10-25 14:29:59,367 [I] ---------- FLUSH PRIVILEGES ---------- 2016-10-25 14:29:59,367 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "FLUSH PRIVILEGES;" 2016-10-25 14:30:01,081 [I] Privileges granted to 'admin' on 'ranger_db' 2016-10-25 14:30:01,081 [I] ---------- Granting privileges TO user 'admin'@'localhost' on db 'ranger_db'---------- 2016-10-25 14:30:01,081 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "grant all privileges on ranger_db.* to 'admin'@'localhost' with grant option;" 2016-10-25 14:30:03,238 [I] ---------- FLUSH PRIVILEGES ---------- 2016-10-25 14:30:03,238 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "FLUSH PRIVILEGES;" 2016-10-25 14:30:04,965 [I] Privileges granted to 'admin' on 'ranger_db' 2016-10-25 14:30:04,965 [I] ---------- Granting privileges TO user 'admin'@'vm-hadoop-m1.fhills.local' on db 'ranger_db'---------- 2016-10-25 14:30:04,965 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "grant all privileges on ranger_db.* to 'admin'@'vm-hadoop-m1.fhills.local' with grant option;" 2016-10-25 14:30:07,016 [I] ---------- FLUSH PRIVILEGES ---------- 2016-10-25 14:30:07,016 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/mysql -u root -p '********' -noheader -trim -c \; -query "FLUSH PRIVILEGES;" 2016-10-25 14:30:08,455 [I] Privileges granted to 'admin' on 'ranger_db' 2016-10-25 14:30:08,455 [I] ---------- Ranger Policy Manager DB and User Creation Process Completed.. ---------- 2016-10-25 14:30:08,471 - Execute['ambari-python-wrap /usr/hdp/current/ranger-admin/db_setup.py'] {'logoutput': True, 'environment': {'PATH': '/usr/sbin:/sbin:/usr/lib/ambari-server/*:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/var/lib/ambari-agent', 'RANGER_ADMIN_HOME': u'/usr/hdp/current/ranger-admin', 'JAVA_HOME': u'/usr/jdk64/jdk1.8.0_77'}, 'user': 'ranger'} 2016-10-25 14:30:09,850 [I] DB FLAVOR :MYSQL 2016-10-25 14:30:09,851 [I] --------- Verifying Ranger DB connection --------- 2016-10-25 14:30:09,851 [I] Checking connection.. 2016-10-25 14:30:09,851 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "SELECT version();" 2016-10-25 14:30:11,143 [I] Checking connection passed. 2016-10-25 14:30:11,143 [I] --------- Verifying Ranger DB tables --------- 2016-10-25 14:30:11,143 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "show tables like 'x_portal_user';" 2016-10-25 14:30:12,292 [I] Table x_portal_user already exists in database 'ranger_db' 2016-10-25 14:30:12,292 [I] --------- Verifying upgrade history table --------- 2016-10-25 14:30:12,292 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "show tables like 'x_db_version_h';" 2016-10-25 14:30:14,213 [I] Table x_db_version_h already exists in database 'ranger_db' 2016-10-25 14:30:14,213 [I] --------- Applying Ranger DB patches --------- 2016-10-25 14:30:14,213 [I] Executing patch on ranger_db from file: 001-groupsource.sql 2016-10-25 14:30:14,213 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = '001' and active = 'Y';" 2016-10-25 14:30:15,857 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = '001' and active = 'N';" 2016-10-25 14:30:16,960 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "insert into x_db_version_h (version, inst_at, inst_by, updated_at, updated_by,active) values ('001', now(), user(), now(), user(),'N') ;" 2016-10-25 14:30:17,964 [I] Patch 001-groupsource.sql is being applied.. 2016-10-25 14:30:17,964 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -input /usr/hdp/current/ranger-admin/db/mysql/patches/001-groupsource.sql Error executing: drop procedure if exists add_group_source_column_to_x_group_table; java.sql.SQLException: Cannot load from mysql.proc. The table is probably corrupted SQLException : SQL state: HY000 java.sql.SQLException: Cannot load from mysql.proc. The table is probably corrupted ErrorCode: 1728 2016-10-25 14:30:18,975 [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/2.5.0.0-1245/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://vm-hadoop-m1.fhills.local/ranger_db -u 'admin' -p '********' -noheader -trim -c \; -query "delete from x_db_version_h where version='001' and active='N';" 2016-10-25 14:30:20,655 [E] 001-groupsource.sql import failed! Command failed after 1 tries

3 REPLIES 3

Re: Ranger Installation Error on HDP 2.5

Expert Contributor

This seems to be the culprit:

java.sql.SQLException: Cannot load from mysql.proc. The table is probably corrupted SQLException : SQL state: HY000 java.sql.SQLException: Cannot load from mysql.proc. The table is probably corrupted ErrorCode: 1728

Please verify MySql version you are using. Ranger supports MySql version 5.6+.

Troubleshooting mysql.proc

http://cornel.co/article/error-code-1728-cannot-load-mysqlproc-table-probably-corrupted

Re: Ranger Installation Error on HDP 2.5

New Contributor

I have currently 5.6.34 version of mysql installed.

Highlighted

Re: Ranger Installation Error on HDP 2.5

New Contributor

make sure the user that you entered into the install fields "root" has permission to create tables etc.

Make sure "root" can login to mysql on the commandline.

please confirm you updated the MySQL JDBC driver

https://dev.mysql.com/downloads/connector/j/5.1.html

and then run a command similar to

For example: ambari-server setup --jdbc-db=mysql --jdbc-driver=/usr/share/java/mysql-connector-java.jar .