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 KMS Install issue

Ranger KMS Install issue

New Contributor

stderr: /var/lib/ambari-agent/data/errors-1109.txt

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py", line 121, in <module>
    KmsServer().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 375, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms_server.py", line 49, in install
    setup_java_patch()
  File "/var/lib/ambari-agent/cache/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py", line 108, in setup_java_patch
    user=params.kms_user)
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 262, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 303, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/jar -uf /usr/hdp/current/ranger-kms/ews/webapp/lib/hadoop-common-2.7.3.2.6.4.0-91.jar /usr/hdp/current/ranger-kms/ews/webapp/META-INF/services/org.apache.hadoop.crypto.key.KeyProviderFactory' returned 127. -bash: /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/jar: No such file or directory

stdout: /var/lib/ambari-agent/data/output-1109.txt

2018-03-03 22:20:46,216 - Stack Feature Version Info: Cluster Stack=2.6, Command Stack=None, Command Version=None -> 2.6
2018-03-03 22:20:46,216 - Using hadoop conf dir: /usr/hdp/2.6.4.0-91/hadoop/conf
2018-03-03 22:20:46,218 - Group['kms'] {}
2018-03-03 22:20:46,220 - Group['livy'] {}
2018-03-03 22:20:46,220 - Group['spark'] {}
2018-03-03 22:20:46,220 - Group['ranger'] {}
2018-03-03 22:20:46,220 - Group['hdfs'] {}
2018-03-03 22:20:46,220 - Group['zeppelin'] {}
2018-03-03 22:20:46,221 - Group['hadoop'] {}
2018-03-03 22:20:46,221 - Group['users'] {}
2018-03-03 22:20:46,221 - Group['knox'] {}
2018-03-03 22:20:46,222 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,223 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,224 - User['infra-solr'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,225 - User['oozie'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users'], 'uid': None}
2018-03-03 22:20:46,225 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,226 - User['ranger'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['ranger'], 'uid': None}
2018-03-03 22:20:46,227 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users'], 'uid': None}
2018-03-03 22:20:46,228 - User['zeppelin'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['zeppelin', 'hadoop'], 'uid': None}
2018-03-03 22:20:46,229 - User['kms'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,230 - User['livy'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,231 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,232 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users'], 'uid': None}
2018-03-03 22:20:46,233 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hdfs'], 'uid': None}
2018-03-03 22:20:46,234 - User['sqoop'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,235 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,236 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,237 - User['hbase'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,238 - User['knox'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,238 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-03-03 22:20:46,239 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2018-03-03 22:20:46,240 - 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 0'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2018-03-03 22:20:46,245 - 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 0'] due to not_if
2018-03-03 22:20:46,246 - Directory['/tmp/hbase-hbase'] {'owner': 'hbase', 'create_parents': True, 'mode': 0775, 'cd_access': 'a'}
2018-03-03 22:20:46,247 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2018-03-03 22:20:46,248 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2018-03-03 22:20:46,250 - call['/var/lib/ambari-agent/tmp/changeUid.sh hbase'] {}
2018-03-03 22:20:46,256 - call returned (0, '1002')
2018-03-03 22:20:46,256 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase 1002'] {'not_if': '(test $(id -u hbase) -gt 1000) || (false)'}
2018-03-03 22:20:46,261 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase 1002'] due to not_if
2018-03-03 22:20:46,262 - Group['hdfs'] {}
2018-03-03 22:20:46,262 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': ['hdfs', 'hdfs']}
2018-03-03 22:20:46,263 - FS Type: 
2018-03-03 22:20:46,263 - Directory['/etc/hadoop'] {'mode': 0755}
2018-03-03 22:20:46,279 - File['/usr/hdp/2.6.4.0-91/hadoop/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2018-03-03 22:20:46,280 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777}
2018-03-03 22:20:46,300 - Repository['HDP-2.6-repo-1'] {'append_to_file': False, 'base_url': 'http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.6.4.0', 'action': ['create'], 'components': ['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': 'ambari-hdp-1', 'mirror_list': None}
2018-03-03 22:20:46,310 - File['/etc/yum.repos.d/ambari-hdp-1.repo'] {'content': '[HDP-2.6-repo-1]\nname=HDP-2.6-repo-1\nbaseurl=http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.6.4.0\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-03-03 22:20:46,310 - Writing File['/etc/yum.repos.d/ambari-hdp-1.repo'] because contents don't match
2018-03-03 22:20:46,311 - Repository with url http://public-repo-1.hortonworks.com/HDP-GPL/centos6/2.x/updates/2.6.4.0 is not created due to its tags: set(['GPL'])
2018-03-03 22:20:46,311 - Repository['HDP-UTILS-1.1.0.22-repo-1'] {'append_to_file': True, 'base_url': 'http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6', 'action': ['create'], 'components': ['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': 'ambari-hdp-1', 'mirror_list': None}
2018-03-03 22:20:46,314 - File['/etc/yum.repos.d/ambari-hdp-1.repo'] {'content': '[HDP-2.6-repo-1]\nname=HDP-2.6-repo-1\nbaseurl=http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.6.4.0\n\npath=/\nenabled=1\ngpgcheck=0\n[HDP-UTILS-1.1.0.22-repo-1]\nname=HDP-UTILS-1.1.0.22-repo-1\nbaseurl=http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.22/repos/centos6\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-03-03 22:20:46,315 - Writing File['/etc/yum.repos.d/ambari-hdp-1.repo'] because contents don't match
2018-03-03 22:20:46,315 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-03-03 22:20:46,397 - Skipping installation of existing package unzip
2018-03-03 22:20:46,397 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-03-03 22:20:46,407 - Skipping installation of existing package curl
2018-03-03 22:20:46,408 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-03-03 22:20:46,421 - Skipping installation of existing package hdp-select
2018-03-03 22:20:46,426 - The repository with version 2.6.4.0-91 for this command has been marked as resolved. It will be used to report the version of the component which was installed
2018-03-03 22:20:46,740 - Command repositories: HDP-2.6-repo-1, HDP-2.6-GPL-repo-1, HDP-UTILS-1.1.0.22-repo-1
2018-03-03 22:20:46,741 - Applicable repositories: HDP-2.6-repo-1, HDP-2.6-GPL-repo-1, HDP-UTILS-1.1.0.22-repo-1
2018-03-03 22:20:46,745 - Looking for matching packages in the following repositories: HDP-2.6-repo-1, HDP-2.6-GPL-repo-1, HDP-UTILS-1.1.0.22-repo-1
2018-03-03 22:20:49,852 - Package['ranger_2_6_4_0_91-kms'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-03-03 22:20:50,014 - Skipping installation of existing package ranger_2_6_4_0_91-kms
2018-03-03 22:20:50,018 - Stack Feature Version Info: Cluster Stack=2.6, Command Stack=None, Command Version=None -> 2.6
2018-03-03 22:20:50,020 - Using hadoop conf dir: /usr/hdp/2.6.4.0-91/hadoop/conf
2018-03-03 22:20:50,024 - Execute[('cp', '-f', '/usr/hdp/current/ranger-kms/install.properties', '/usr/hdp/current/ranger-kms/install-backup.properties')] {'not_if': 'ls /usr/hdp/current/ranger-kms/install-backup.properties', 'sudo': True, 'only_if': 'ls /usr/hdp/current/ranger-kms/install.properties'}
2018-03-03 22:20:50,033 - Skipping Execute[('cp', '-f', '/usr/hdp/current/ranger-kms/install.properties', '/usr/hdp/current/ranger-kms/install-backup.properties')] due to not_if
2018-03-03 22:20:50,034 - Password validated
2018-03-03 22:20:50,035 - File['/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar'] {'action': ['delete']}
2018-03-03 22:20:50,036 - Deleting File['/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar']
2018-03-03 22:20:50,038 - File['/var/lib/ambari-agent/tmp/mysql-connector-java.jar'] {'content': DownloadSource('http://master.hadoop.com:8080/resources//mysql-connector-java.jar'), 'mode': 0644}
2018-03-03 22:20:50,038 - Not downloading the file from http://master.hadoop.com:8080/resources//mysql-connector-java.jar, because /var/lib/ambari-agent/tmp/mysql-connector-java.jar already exists
2018-03-03 22:20:50,040 - Directory['/usr/hdp/current/ranger-kms/ews/lib'] {'mode': 0755}
2018-03-03 22:20:50,040 - Execute[('cp', '--remove-destination', '/var/lib/ambari-agent/tmp/mysql-connector-java.jar', '/usr/hdp/current/ranger-kms/ews/webapp/lib')] {'path': ['/bin', '/usr/bin/'], 'sudo': True}
2018-03-03 22:20:50,050 - File['/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar'] {'mode': 0644}
2018-03-03 22:20:50,051 - ModifyPropertiesFile['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'properties': ...}
2018-03-03 22:20:50,052 - Modifying existing properties file: /usr/hdp/current/ranger-kms/install.properties
2018-03-03 22:20:50,067 - File['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'content': ..., 'group': None, 'mode': None, 'encoding': 'utf-8'}
2018-03-03 22:20:50,067 - Writing File['/usr/hdp/current/ranger-kms/install.properties'] because contents don't match
2018-03-03 22:20:50,068 - ModifyPropertiesFile['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'properties': {'SQL_CONNECTOR_JAR': '/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar'}}
2018-03-03 22:20:50,068 - Modifying existing properties file: /usr/hdp/current/ranger-kms/install.properties
2018-03-03 22:20:50,070 - File['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'content': ..., 'group': None, 'mode': None, 'encoding': 'utf-8'}
2018-03-03 22:20:50,070 - Writing File['/usr/hdp/current/ranger-kms/install.properties'] because contents don't match
2018-03-03 22:20:50,071 - Separate DBA property not set. Assuming Ranger KMS DB and DB User exists!
2018-03-03 22:20:50,071 - Execute['ambari-python-wrap /usr/hdp/current/ranger-kms/db_setup.py'] {'logoutput': True, 'environment': {'RANGER_KMS_HOME': '/usr/hdp/current/ranger-kms', 'JAVA_HOME': '/usr/lib/jvm/jre-1.8.0-openjdk.x86_64'}, 'tries': 5, 'user': 'kms', 'try_sleep': 10}
2018-03-03 22:20:50,143  [I] DB FLAVOR :MYSQL
2018-03-03 22:20:50,144  [I] --------- Verifying Ranger DB connection ---------
2018-03-03 22:20:50,144  [I] Checking connection..
2018-03-03 22:20:50,144  [JISQL] /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java  -cp /usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-kms/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://node1.hadoop.com/rangerkms -u 'rangerkms' -p '********' -noheader -trim -c \; -query "SELECT version();"
2018-03-03 22:20:50,761  [I] Checking connection passed.
2018-03-03 22:20:50,762  [I] --------- Verifying Ranger DB tables ---------
2018-03-03 22:20:50,762  [JISQL] /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java  -cp /usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-kms/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://node1.hadoop.com/rangerkms -u 'rangerkms' -p '********' -noheader -trim -c \; -query "show tables like 'ranger_masterkey';"
2018-03-03 22:20:51,711  [I] Table ranger_masterkey already exists in database 'rangerkms'
2018-03-03 22:20:51,719 - Directory['/usr/hdp/current/ranger-kms/conf'] {'owner': 'kms', 'group': 'kms', 'create_parents': True}
2018-03-03 22:20:51,722 - Directory['/etc/security/serverKeys'] {'create_parents': True, 'cd_access': 'a'}
2018-03-03 22:20:51,723 - Directory['/etc/ranger/kms'] {'create_parents': True, 'cd_access': 'a'}
2018-03-03 22:20:51,725 - File['/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar'] {'action': ['delete']}
2018-03-03 22:20:51,726 - Deleting File['/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar']
2018-03-03 22:20:51,726 - File['/var/lib/ambari-agent/tmp/mysql-connector-java.jar'] {'content': DownloadSource('http://master.hadoop.com:8080/resources//mysql-connector-java.jar'), 'mode': 0644}
2018-03-03 22:20:51,727 - Not downloading the file from http://master.hadoop.com:8080/resources//mysql-connector-java.jar, because /var/lib/ambari-agent/tmp/mysql-connector-java.jar already exists
2018-03-03 22:20:51,729 - Directory['/usr/hdp/current/ranger-kms/ews/lib'] {'mode': 0755}
2018-03-03 22:20:51,729 - Execute[('cp', '--remove-destination', '/var/lib/ambari-agent/tmp/mysql-connector-java.jar', '/usr/hdp/current/ranger-kms/ews/webapp/lib')] {'path': ['/bin', '/usr/bin/'], 'sudo': True}
2018-03-03 22:20:51,738 - File['/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar'] {'mode': 0644}
2018-03-03 22:20:51,739 - ModifyPropertiesFile['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'properties': ...}
2018-03-03 22:20:51,739 - Modifying existing properties file: /usr/hdp/current/ranger-kms/install.properties
2018-03-03 22:20:51,747 - File['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'content': ..., 'group': None, 'mode': None, 'encoding': 'utf-8'}
2018-03-03 22:20:51,748 - Writing File['/usr/hdp/current/ranger-kms/install.properties'] because contents don't match
2018-03-03 22:20:51,748 - ModifyPropertiesFile['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'properties': {'SQL_CONNECTOR_JAR': '/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar'}}
2018-03-03 22:20:51,749 - Modifying existing properties file: /usr/hdp/current/ranger-kms/install.properties
2018-03-03 22:20:51,754 - File['/usr/hdp/current/ranger-kms/install.properties'] {'owner': 'kms', 'content': ..., 'group': None, 'mode': None, 'encoding': 'utf-8'}
2018-03-03 22:20:51,755 - Writing File['/usr/hdp/current/ranger-kms/install.properties'] because contents don't match
2018-03-03 22:20:51,758 - File['/usr/lib/ambari-agent/DBConnectionVerification.jar'] {'content': DownloadSource('http://master.hadoop.com:8080/resources/DBConnectionVerification.jar'), 'mode': 0644}
2018-03-03 22:20:51,762 - Not downloading the file from http://master.hadoop.com:8080/resources/DBConnectionVerification.jar, because /var/lib/ambari-agent/tmp/DBConnectionVerification.jar already exists
2018-03-03 22:20:51,763 - Execute['/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java -cp /usr/lib/ambari-agent/DBConnectionVerification.jar:/usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar org.apache.ambari.server.DBConnectionVerification 'jdbc:mysql://node1.hadoop.com:3306/rangerkms' rangerkms [PROTECTED] com.mysql.jdbc.Driver'] {'environment': {}, 'path': ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'], 'tries': 5, 'try_sleep': 10}
2018-03-03 22:20:52,745 - Directory['/usr/hdp/current/ranger-kms/ews/webapp/WEB-INF/classes/lib'] {'owner': 'kms', 'group': 'kms', 'mode': 0755}
2018-03-03 22:20:52,749 - Execute[('cp', '/usr/hdp/current/ranger-kms/ranger-kms-initd', '/etc/init.d/ranger-kms')] {'not_if': 'ls /etc/init.d/ranger-kms', 'sudo': True, 'only_if': 'ls /usr/hdp/current/ranger-kms/ranger-kms-initd'}
2018-03-03 22:20:52,758 - Skipping Execute[('cp', '/usr/hdp/current/ranger-kms/ranger-kms-initd', '/etc/init.d/ranger-kms')] due to not_if
2018-03-03 22:20:52,758 - File['/etc/init.d/ranger-kms'] {'mode': 0755}
2018-03-03 22:20:52,759 - Directory['/usr/hdp/current/ranger-kms/'] {'owner': 'kms', 'group': 'kms', 'recursive_ownership': True}
2018-03-03 22:20:52,784 - Directory['/var/run/ranger_kms'] {'owner': 'kms', 'group': 'hadoop', 'create_parents': True, 'mode': 0755, 'cd_access': 'a'}
2018-03-03 22:20:52,785 - File['/usr/hdp/current/ranger-kms/conf/ranger-kms-env-piddir.sh'] {'owner': 'kms', 'content': 'export RANGER_KMS_PID_DIR_PATH=/var/run/ranger_kms\nexport KMS_USER=kms', 'group': 'kms', 'mode': 0755}
2018-03-03 22:20:52,789 - Directory['/var/log/ranger/kms'] {'owner': 'kms', 'group': 'kms', 'create_parents': True, 'mode': 0755, 'cd_access': 'a'}
2018-03-03 22:20:52,789 - Changing permission for /var/log/ranger/kms from 775 to 755
2018-03-03 22:20:52,792 - File['/usr/hdp/current/ranger-kms/conf/ranger-kms-env-logdir.sh'] {'owner': 'kms', 'content': 'export RANGER_KMS_LOG_DIR=/var/log/ranger/kms', 'group': 'kms', 'mode': 0755}
2018-03-03 22:20:52,793 - Execute[('ln', '-sf', '/usr/hdp/current/ranger-kms/ranger-kms', '/usr/bin/ranger-kms')] {'not_if': 'ls /usr/bin/ranger-kms', 'sudo': True, 'only_if': 'ls /usr/hdp/current/ranger-kms/ranger-kms'}
2018-03-03 22:20:52,802 - Skipping Execute[('ln', '-sf', '/usr/hdp/current/ranger-kms/ranger-kms', '/usr/bin/ranger-kms')] due to not_if
2018-03-03 22:20:52,803 - File['/usr/bin/ranger-kms'] {'mode': 0755}
2018-03-03 22:20:52,805 - Execute[('ln', '-sf', '/usr/hdp/current/ranger-kms/ranger-kms', '/usr/bin/ranger-kms-services.sh')] {'not_if': 'ls /usr/bin/ranger-kms-services.sh', 'sudo': True, 'only_if': 'ls /usr/hdp/current/ranger-kms/ranger-kms'}
2018-03-03 22:20:52,812 - Skipping Execute[('ln', '-sf', '/usr/hdp/current/ranger-kms/ranger-kms', '/usr/bin/ranger-kms-services.sh')] due to not_if
2018-03-03 22:20:52,812 - File['/usr/bin/ranger-kms-services.sh'] {'mode': 0755}
2018-03-03 22:20:52,813 - Execute[('ln', '-sf', '/usr/hdp/current/ranger-kms/ranger-kms-initd', '/usr/hdp/current/ranger-kms/ranger-kms-services.sh')] {'not_if': 'ls /usr/hdp/current/ranger-kms/ranger-kms-services.sh', 'sudo': True, 'only_if': 'ls /usr/hdp/current/ranger-kms/ranger-kms-initd'}
2018-03-03 22:20:52,818 - Skipping Execute[('ln', '-sf', '/usr/hdp/current/ranger-kms/ranger-kms-initd', '/usr/hdp/current/ranger-kms/ranger-kms-services.sh')] due to not_if
2018-03-03 22:20:52,819 - File['/usr/hdp/current/ranger-kms/ranger-kms-services.sh'] {'mode': 0755}
2018-03-03 22:20:52,819 - Directory['/var/log/ranger/kms'] {'owner': 'kms', 'group': 'kms', 'mode': 0775}
2018-03-03 22:20:52,820 - Changing permission for /var/log/ranger/kms from 755 to 775
2018-03-03 22:20:52,821 - Execute[('/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java', '-cp', '/usr/hdp/current/ranger-kms/cred/lib/*', 'org.apache.ranger.credentialapi.buildks', 'create', 'ranger.ks.jdbc.password', '-value', [PROTECTED], '-provider', 'jceks://file/etc/ranger/kms/rangerkms.jceks')] {'logoutput': True, 'environment': {'JAVA_HOME': '/usr/lib/jvm/jre-1.8.0-openjdk.x86_64'}, 'sudo': True}
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Mar 03, 2018 10:20:54 PM org.apache.hadoop.util.NativeCodeLoader <clinit>
WARNING: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
The alias ranger.ks.jdbc.password already exists!! Will try to delete first.
FOUND value of [interactive] field in the Class [org.apache.hadoop.security.alias.CredentialShell] = [true]
Deleting credential: ranger.ks.jdbc.password from CredentialProvider: jceks://file/etc/ranger/kms/rangerkms.jceks
ranger.ks.jdbc.password has been successfully deleted.
org.apache.hadoop.security.alias.JavaKeyStoreProvider has been updated.
ranger.ks.jdbc.password has been successfully created.
org.apache.hadoop.security.alias.JavaKeyStoreProvider has been updated.
2018-03-03 22:20:55,646 - File['/etc/ranger/kms/rangerkms.jceks'] {'owner': 'kms', 'group': 'kms', 'mode': 0640}
2018-03-03 22:20:55,647 - Execute[('/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java', '-cp', '/usr/hdp/current/ranger-kms/cred/lib/*', 'org.apache.ranger.credentialapi.buildks', 'create', 'ranger.ks.masterkey.password', '-value', [PROTECTED], '-provider', 'jceks://file/etc/ranger/kms/rangerkms.jceks')] {'logoutput': True, 'environment': {'JAVA_HOME': '/usr/lib/jvm/jre-1.8.0-openjdk.x86_64'}, 'sudo': True}
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Mar 03, 2018 10:20:56 PM org.apache.hadoop.util.NativeCodeLoader <clinit>
WARNING: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
The alias ranger.ks.masterkey.password already exists!! Will try to delete first.
FOUND value of [interactive] field in the Class [org.apache.hadoop.security.alias.CredentialShell] = [true]
Deleting credential: ranger.ks.masterkey.password from CredentialProvider: jceks://file/etc/ranger/kms/rangerkms.jceks
ranger.ks.masterkey.password has been successfully deleted.
org.apache.hadoop.security.alias.JavaKeyStoreProvider has been updated.
ranger.ks.masterkey.password has been successfully created.
org.apache.hadoop.security.alias.JavaKeyStoreProvider has been updated.
2018-03-03 22:21:03,078 - File['/etc/ranger/kms/rangerkms.jceks'] {'owner': 'kms', 'group': 'kms', 'mode': 0640}
2018-03-03 22:21:03,082 - XmlConfig['dbks-site.xml'] {'group': 'kms', 'conf_dir': '/usr/hdp/current/ranger-kms/conf', 'mode': 0644, 'configuration_attributes': {}, 'owner': 'kms', 'configurations': ...}
2018-03-03 22:21:03,171 - Generating config: /usr/hdp/current/ranger-kms/conf/dbks-site.xml
2018-03-03 22:21:03,172 - File['/usr/hdp/current/ranger-kms/conf/dbks-site.xml'] {'owner': 'kms', 'content': InlineTemplate(...), 'group': 'kms', 'mode': 0644, 'encoding': 'UTF-8'}
2018-03-03 22:21:03,225 - XmlConfig['ranger-kms-site.xml'] {'group': 'kms', 'conf_dir': '/usr/hdp/current/ranger-kms/conf', 'mode': 0644, 'configuration_attributes': {}, 'owner': 'kms', 'configurations': ...}
2018-03-03 22:21:03,272 - Generating config: /usr/hdp/current/ranger-kms/conf/ranger-kms-site.xml
2018-03-03 22:21:03,272 - File['/usr/hdp/current/ranger-kms/conf/ranger-kms-site.xml'] {'owner': 'kms', 'content': InlineTemplate(...), 'group': 'kms', 'mode': 0644, 'encoding': 'UTF-8'}
2018-03-03 22:21:03,305 - XmlConfig['kms-site.xml'] {'group': 'kms', 'conf_dir': '/usr/hdp/current/ranger-kms/conf', 'mode': 0644, 'configuration_attributes': {}, 'owner': 'kms', 'configurations': ...}
2018-03-03 22:21:03,335 - Generating config: /usr/hdp/current/ranger-kms/conf/kms-site.xml
2018-03-03 22:21:03,335 - File['/usr/hdp/current/ranger-kms/conf/kms-site.xml'] {'owner': 'kms', 'content': InlineTemplate(...), 'group': 'kms', 'mode': 0644, 'encoding': 'UTF-8'}
2018-03-03 22:21:03,391 - File['/usr/hdp/current/ranger-kms/conf/kms-log4j.properties'] {'content': InlineTemplate(...), 'owner': 'kms', 'group': 'kms', 'mode': 0644}
2018-03-03 22:21:03,393 - File['/usr/hdp/current/ranger-kms/conf/core-site.xml'] {'action': ['delete']}
2018-03-03 22:21:03,394 - Execute['ambari-python-wrap /usr/hdp/current/ranger-kms/db_setup.py -javapatch'] {'logoutput': True, 'environment': {'RANGER_KMS_HOME': '/usr/hdp/current/ranger-kms', 'JAVA_HOME': '/usr/lib/jvm/jre-1.8.0-openjdk.x86_64'}, 'tries': 5, 'user': 'kms', 'try_sleep': 10}
2018-03-03 22:21:03,595  [I] DB FLAVOR :MYSQL
2018-03-03 22:21:03,596  [I] --------- Verifying Ranger DB connection ---------
2018-03-03 22:21:03,596  [I] Checking connection..
2018-03-03 22:21:03,596  [JISQL] /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java  -cp /usr/hdp/current/ranger-kms/ews/webapp/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-kms/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://node1.hadoop.com/rangerkms -u 'rangerkms' -p '********' -noheader -trim -c \; -query "SELECT version();"
2018-03-03 22:21:04,362  [I] Checking connection passed.
2018-03-03 22:21:04,369 - Execute[('/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/jar', '-uf', '/usr/hdp/current/ranger-kms/ews/webapp/lib/hadoop-common-2.7.3.2.6.4.0-91.jar', '/usr/hdp/current/ranger-kms/ews/webapp/META-INF/services/org.apache.hadoop.crypto.key.KeyProviderFactory')] {'user': 'kms'}
2018-03-03 22:21:04,396 - The repository with version 2.6.4.0-91 for this command has been marked as resolved. It will be used to report the version of the component which was installed

Command failed after 1 tries
2 REPLIES 2

Re: Ranger KMS Install issue

Super Mentor

@Sujatha Rudra

The following error indicates that you do not have the correct JAVA_HOME set to point to your JDK installation directory.

 -bash: /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/jar: No such file or directory

.

You might have installed JRE (Not the JDK).

Hence it is not able to locate the "jar" command inside the $JAVA_HOME/bin directory.

Please check if by any chance you have set the JAVA_HOME to a JRE directory for the user profile "kms" or globally on the KMS host? like "~/.bash_profile" , "~/.profile" , "/etc/profile" file to findout if you have set the JAVA_HOME incorrectly.

Also please check the output of the following command:

# su - kms
# echo $JAVA_HOME

.

If above path is pointing to JRE installation dir then please change it to JDK installation directory. Also please make sure that the "kms" user has proper read & execute permission on the "$JAVA_HOME/bin" direc tory contents.

Re: Ranger KMS Install issue

New Contributor

Thank You for your response, JAVA_HOME has been set and kms has r_x permissions on $JAVA_HOME/bin

[root@master usr]# su - kms

[kms@master ~]$ echo $JAVA_HOME

/usr/jdk64/jdk1.8.0_112

I ran this on command line.

[kms@master ~]$ /usr/jdk64/jdk1.8.0_112/bin/jar -uf /usr/hdp/current/ranger-kms/ews/webapp/lib/hadoop-common-2.7.3.2.6.4.0-91.jar /usr/hdp/current/ranger-kms/ews/webapp/META-INF/services/org.apache.hadoop.crypto.key.KeyProviderFactory [kms@master ~]$

But I am still getting same error through ambari.

Don't have an account?
Coming from Hortonworks? Activate your account here