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.

Error to Install Ranger

Solved Go to solution

Error to Install Ranger

Hi Guys !!

Tengo un problema con la instalacion de Ranger, realice primero la instalacion correctamente, pero tenia algunos problemas con la conexion de MYSQL pero de la desesperacion, se me ocurrio desinstalarlo y al querer volver a instalarlo, tengo errores, y realmente no he encontrado una solucion similar, el error es al instalar Ranger Tagsync. Les comparto el archivo de log.

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py", line 135, in <module>
    RangerTagsync().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 314, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py", line 41, in install
    ranger_credential_helper(params.tagsync_cred_lib, 'tagadmin.user.password', 'rangertagsync', params.tagsync_jceks_path)
  File "/var/lib/ambari-agent/cache/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py", line 627, in ranger_credential_helper
    Execute(cmd, environment={'JAVA_HOME': params.java_home}, logoutput=True, sudo=True)
  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 262, 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 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/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/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/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/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/bin/java -cp '/usr/hdp/current/ranger-tagsync/lib/*' org.apache.ranger.credentialapi.buildks create tagadmin.user.password -value '[PROTECTED]' -provider jceks://file/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks' returned 1. Error: Could not find or load main class org.apache.ranger.credentialapi.buildks
stdout: /var/lib/ambari-agent/data/output-1104.txt
2018-04-05 17:10:52,460 - Stack Feature Version Info: stack_version=2.6, version=2.6.4.0-91, current_cluster_version=2.6.4.0-91 -> 2.6.4.0-91
2018-04-05 17:10:52,469 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
User Group mapping (user_group) is missing in the hostLevelParams
2018-04-05 17:10:52,471 - Group['livy'] {}
2018-04-05 17:10:52,472 - Group['spark'] {}
2018-04-05 17:10:52,472 - Group['ranger'] {}
2018-04-05 17:10:52,473 - Group['hadoop'] {}
2018-04-05 17:10:52,473 - Group['users'] {}
2018-04-05 17:10:52,473 - Group['knox'] {}
2018-04-05 17:10:52,473 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,474 - User['storm'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,475 - User['infra-solr'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,476 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,476 - User['atlas'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,477 - User['oozie'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2018-04-05 17:10:52,478 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,479 - User['falcon'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2018-04-05 17:10:52,479 - User['ranger'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'ranger']}
2018-04-05 17:10:52,480 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2018-04-05 17:10:52,481 - User['accumulo'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,482 - User['livy'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,482 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,483 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2018-04-05 17:10:52,484 - User['flume'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,485 - User['kafka'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,486 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,486 - User['sqoop'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,487 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,488 - User['hbase'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,489 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,490 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,490 - User['knox'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2018-04-05 17:10:52,491 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2018-04-05 17:10:52,493 - 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)'}
2018-04-05 17:10:52,501 - 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
2018-04-05 17:10:52,501 - Directory['/tmp/hbase-hbase'] {'owner': 'hbase', 'create_parents': True, 'mode': 0775, 'cd_access': 'a'}
2018-04-05 17:10:52,502 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2018-04-05 17:10:52,504 - 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)'}
2018-04-05 17:10:52,512 - 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
2018-04-05 17:10:52,512 - Group['hdfs'] {}
2018-04-05 17:10:52,513 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': [u'hadoop', u'hdfs']}
2018-04-05 17:10:52,514 - FS Type: 
2018-04-05 17:10:52,514 - Directory['/etc/hadoop'] {'mode': 0755}
2018-04-05 17:10:52,539 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2018-04-05 17:10:52,540 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777}
2018-04-05 17:10:52,565 - Initializing 2 repositories
2018-04-05 17:10:52,567 - Repository['HDP-2.6'] {'base_url': 'http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.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}
2018-04-05 17:10:52,588 - File['/etc/yum.repos.d/HDP.repo'] {'content': '[HDP-2.6]\nname=HDP-2.6\nbaseurl=http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.4.0\n\npath=/\nenabled=1\ngpgcheck=0'}
2018-04-05 17:10:52,590 - 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}
2018-04-05 17:10:52,600 - 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'}
2018-04-05 17:10:52,601 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-04-05 17:10:52,778 - Skipping installation of existing package unzip
2018-04-05 17:10:52,778 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-04-05 17:10:52,805 - Skipping installation of existing package curl
2018-04-05 17:10:52,805 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-04-05 17:10:52,825 - Skipping installation of existing package hdp-select
2018-04-05 17:10:53,431 - Version 2.6.4.0-91 was provided as effective cluster version.  Using package version 2_6_4_0_91
2018-04-05 17:10:53,433 - Package['ranger_2_6_4_0_91-admin'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-04-05 17:10:53,554 - Skipping installation of existing package ranger_2_6_4_0_91-admin
2018-04-05 17:10:53,555 - Version 2.6.4.0-91 was provided as effective cluster version.  Using package version 2_6_4_0_91
2018-04-05 17:10:53,556 - Package['ranger_2_6_4_0_91-usersync'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-04-05 17:10:53,577 - Skipping installation of existing package ranger_2_6_4_0_91-usersync
2018-04-05 17:10:53,578 - Version 2.6.4.0-91 was provided as effective cluster version.  Using package version 2_6_4_0_91
2018-04-05 17:10:53,579 - Package['ranger_2_6_4_0_91-tagsync'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-04-05 17:10:53,600 - Skipping installation of existing package ranger_2_6_4_0_91-tagsync
2018-04-05 17:10:53,601 - Stack Feature Version Info: stack_version=2.6, version=2.6.4.0-91, current_cluster_version=2.6.4.0-91 -> 2.6.4.0-91
2018-04-05 17:10:53,656 - Execute[(u'/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/bin/java', '-cp', u'/usr/hdp/current/ranger-tagsync/lib/*', 'org.apache.ranger.credentialapi.buildks', 'create', 'tagadmin.user.password', '-value', [PROTECTED], '-provider', u'jceks://file/usr/hdp/current/ranger-tagsync/conf/rangertagsync.jceks')] {'logoutput': True, 'environment': {'JAVA_HOME': u'/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64'}, 'sudo': True}
Error: Could not find or load main class org.apache.ranger.credentialapi.buildks

Command failed after 1 tries
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Error to Install Ranger

Super Mentor

@Antony Hernandez

Based on the error it looks like the "tagsync" is not installing properly and has some missing JARs.

Error: Could not find or load main class org.apache.ranger.credentialapi.buildks

.

Can you please check if you have the "credentialbuilder" jar located in the following dir? (The Jar version might be different in oyur case based on your HDP version)

# ls -l /usr/hdp/current/ranger-tagsync/lib/credentialbuilder-0.7.0.2.6.4.0-91.jar 
-rwxr-xr-x. 1 root root 18240 Jan  4 10:57 /usr/hdp/current/ranger-tagsync/lib/credentialbuilder-0.7.0.2.6.4.0-91.jar

.

If not then just for testing can you try copying this jar from "ranger-admin/creds/lib" to "ranger-tagsync/lib/" to see if it works.

# ls -l /usr/hdp/current/ranger-admin/cred/lib/credentialbuilder-0.7.0.2.6.4.0-91.jar

.

View solution in original post

3 REPLIES 3
Highlighted

Re: Error to Install Ranger

Super Mentor

@Antony Hernandez

Based on the error it looks like the "tagsync" is not installing properly and has some missing JARs.

Error: Could not find or load main class org.apache.ranger.credentialapi.buildks

.

Can you please check if you have the "credentialbuilder" jar located in the following dir? (The Jar version might be different in oyur case based on your HDP version)

# ls -l /usr/hdp/current/ranger-tagsync/lib/credentialbuilder-0.7.0.2.6.4.0-91.jar 
-rwxr-xr-x. 1 root root 18240 Jan  4 10:57 /usr/hdp/current/ranger-tagsync/lib/credentialbuilder-0.7.0.2.6.4.0-91.jar

.

If not then just for testing can you try copying this jar from "ranger-admin/creds/lib" to "ranger-tagsync/lib/" to see if it works.

# ls -l /usr/hdp/current/ranger-admin/cred/lib/credentialbuilder-0.7.0.2.6.4.0-91.jar

.

View solution in original post

Highlighted

Re: Error to Install Ranger

Ya quedo resuelto el problema, tuve que reinstalar los paquetes de Ranger manualmente, yum search ranger y reinstall algunos paquetes, al volver a tirar tus comandos ya me aparecia credentialbuilder, pero me aparecia un error de que no podia ejecutar Mkdir en una ruta, cuando aparece la ruta quise acceder a ella, pero me genero errores de enlaces simbolicos duplicados, rastreando los archivos a donde apuntaban, los elimine, reinstale Ranger y funciono. Muchas Gracias, tu respuesta me dio la idea.

Highlighted

Re: Error to Install Ranger

Cuando pongo las rutas me dice que no existe ningun directorio, solo llega hasta "/usr/hdp/current/" y aparece un enlace simbólico de los archivos de ranger apuntando a "/usr/ hdp / 2.6.4.0-91 / ranger-tagsync" que no existe el directorio, ya que solo aparecen los demas servicios, excepto los de ranger (ranger-tagsync, ranger-admin, etc).

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