Ambari HDP 2.3 cannot install Ranger

Bug #1496527 reported by Chris Buccella
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Sahara
Triaged
Medium
Unassigned

Bug Description

I'm using the ambari plugin code from git. The image is based on Centos 6.7

When creating a cluster with Ranger enabled, installation of Ranger fails.

$ more ranger_db_patch.log
2015-09-16 00:42:33,538 [main] INFO org.apache.ranger.patch.PatchPasswordEncryption_J10001 (PatchPasswordEncryption_J10001.java:83) - main()
2015-09-16 00:42:35,976 [main] INFO org.springframework.core.io.support.PropertiesLoaderSupport (PropertiesLoaderSupport.java:177) - Loading properties file from class path resource [ranger-admin-default-site.xml]
2015-09-16 00:42:35,990 [main] INFO org.springframework.core.io.support.PropertiesLoaderSupport (PropertiesLoaderSupport.java:177) - Loading properties file from class path resource [ranger-admin-site.xml]
2015-09-16 00:42:36,394 [main] WARN org.apache.hadoop.util.NativeCodeLoader (NativeCodeLoader.java:62) - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
2015-09-16 00:42:36,639 [main] INFO org.springframework.core.io.support.PropertiesLoaderSupport (PropertiesLoaderSupport.java:177) - Loading properties file from class path resource [db_message_bundle.properties]
2015-09-16 00:42:38,981 [main] ERROR org.apache.ranger.common.RangerConfigUtil (RangerConfigUtil.java:44) - webapp URL is not set. Please ranger.externalurl property
2015-09-16 00:42:39,014 [main] INFO org.apache.ranger.biz.RangerBizUtil (RangerBizUtil.java:127) - Audit datasource is db
2015-09-16 00:42:40,949 [main] INFO org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil (EmbeddedServiceDefsUtil.java:92) - ==> EmbeddedServiceDefsUtil.init()
2015-09-16 00:42:41,059 [main] FATAL org.apache.ranger.plugin.store.EmbeddedServiceDefsUtil (EmbeddedServiceDefsUtil.java:181) - EmbeddedServiceDefsUtil.getOrCreateServiceDef(): failed to load/create serviceType hdfs
javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20131113-a7346c6): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: No database selected
Error Code: 1046

ranger-admin-site.xml has bad/missing values for:
- ranger.externalurl
- ranger.jpa.audit.jdbc.url
- ranger.jpa.jdbc.url

After setting these, I was able to successfully run the failed portion of the install:
python /usr/hdp/current/ranger-admin/db_setup.py -javapatch

description: updated
Revision history for this message
Chris Buccella (chris-buccella) wrote :

This is probably rooted in a bug in Ambari. But until that's fixed, Sahara's Ambari plugin can mitigate the problem so that the user can successfully provision a cluster that includes Ranger.

Revision history for this message
Chris Buccella (chris-buccella) wrote :
Changed in sahara:
status: New → Triaged
importance: Undecided → High
Changed in sahara:
milestone: none → mitaka-1
tags: added: plugin.ambari
Changed in sahara:
milestone: mitaka-1 → mitaka-2
Changed in sahara:
milestone: mitaka-2 → mitaka-3
Changed in sahara:
milestone: mitaka-3 → mitaka-rc1
Changed in sahara:
milestone: mitaka-rc1 → newton-1
Changed in sahara:
milestone: newton-1 → none
Changed in sahara:
importance: High → Medium
Revision history for this message
sven mark (svenmark) wrote :

we can change mysql to mariadb,like:

/opt/stack/sahara/sahara/plugins/ambary (192)

        sudo("yum install -y mariadb-server")
        sudo("service mariadb start")
mysql and mariadb can replace by each other,this can solve the bug

Revision history for this message
Luigi Toscano (ltoscano) wrote :

"yum install mysql-server" on centos 7 should install mariadb-server.
The name of the service is indeed different.

Revision history for this message
Vitalii Gridnev (vgridnev) wrote :

That will not solve this bug, the issue is that Ambari can't deploy Ranger via blueprints. See open issue: https://issues.apache.org/jira/browse/AMBARI-12413 . Additionally, database stuff has to be installed separately and will be installed via DIB.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers