Community Articles
Find and share helpful community-sourced technical articles.
Check out our newest addition to the community, the Cloudera Innovation Accelerator group hub.
Labels (2)

This article with cover step by step how to configure HDP Search Solr with Ranger Plugin

Step 1

Download and install the 2.2.9+ mpack - FYI: Previous mpack versions don't support integration of HDP Search Solr with Ranger. Mpack 2.2.9 includes configurable section for the solr-security on ambari which allows to add the authorization information.

wget ''; -O /tmp/solr-service-mpack-2.2.9.tar.gz

ambari-server install-mpack --mpack=/tmp/solr-service-mpack-2.2.9.tar.gz

Step 2

On HDP solr host run

yum install ranger-solr-plugin.noarch

cd /usr/hdp/

Edit and make sure the following settings at least are properly configured:


Edit and set correct value for install dir:


Next source the environment and enable the plugin:

source /etc/hadoop/ 

Step 3

Update security znode with ranger authorization class

kinit -kt solr.service.keytab solr/<host>@REALM.COM 

/opt/lucidworks-hdpsearch/solr/server/scripts/cloud-scripts/ -z '<zookeeper>:2181' -cmd put /solr/security.json '{"authentication":{"class": ""},"authorization":{"class": "org.apache.ranger.authorization.solr.authorizer.RangerSolrAuthorizer"}}'

Also on Ambari->Solr-Config->Advance solr-security set:

"authentication":{"class": ""},
"authorization":{"class": "org.apache.ranger.authorization.solr.authorizer.RangerSolrAuthorizer"}

Save and restart, on the operation start output you should see

- call['/opt/lucidworks-hdpsearch/solr/server/scripts/cloud-scripts/ -zkhost <zookeeper1>:2181,<zookeeper2>:2181,<zookeeper3>:2181 -cmd get /solr/security.json'] {'timeout': 60, 'env': {'JAVA_HOME': u'/usr/jdk64/jdk1.8.0_112'}}
- call returned (0, '{\"authentication\":{\"class\": \"\"},\"authorization\":{\"class\": \"org.apache.ranger.authorization.solr.authorizer.RangerSolrAuthorizer\"}}')
- Solr Security Json was found, it will not be overridden

Step 4

Fix clustername for solr plugin

cd /opt/lucidworks-hdpsearch/solr/server/solr-webapp/webapp/WEB-INF/classes/ 

Edit ranger-solr-audit.xml and add following property


Restart solr for changes to reflect.

Step 5

Open Ranger Admin UI and edit solr repository add New Configurations = solr = solr
ambari.service.check.user = ambari-qa
Don't have an account?
Version history
Last update:
‎06-20-2018 03:56 PM
Updated by:
Top Kudoed Authors