Community Articles

Find and share helpful community-sourced technical articles.

From HDP-2.5 onwards Ranger installation with Ambari 2.4.0, supports uploading of solrconfig to zookeeper during start of Ranger Admin component. However once default solrconfig.xml is uploaded the modified solrconfig.xml is not uploaded again for the next Ranger Admin start.

To upload modified solrconfig.xml, below manual steps needs to be followed.

1) Edit solrconfig.xml: Ranger solrconfig.xml is located at /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf/solrconfig.xml

2) Upload modified solrconfig.xml under znode used by Ranger Audit: Znode can be found in property ranger.audit.solr.zookeepers as {zookeeper_host}:2181/znode under Ranger Audit Tab.

NOTE: If Ranger is using Ambari Infra solr cloud then default znode is /infra-solr otherwise if it is using externally managed solr cloud znode is /ranger_audits

Use below command to upload, need to also export JAVA_HOME=/usr/jdk64/jdk1.8.0_77

/usr/lib/ambari-infra-solr-client/ --zookeeper-connect-string {zookeeper_host}:2181/infra-solr --upload-config --config-dir /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf --config-set ranger_audits 

NOTE: For kerberos env use --jaas-file oprtion and provide the jass file path as /usr/hdp/current/ranger-admin/conf/ranger_solr_jaas.conf

/usr/lib/ambari-infra-solr-client/ --zookeeper-connect-string {zookeeper_host}:2181/infra-solr --upload-config --config-dir /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf --config-set ranger_audits --jaas-file /usr/hdp/current/ranger-admin/conf/ranger_solr_jaas.conf

3) Restart Solr Service: If using Ambari Infra, restart Ambari Infra service from Ambari.

NOTE: Using Ambari with HDP-2.6, solrconfig.xml can be modified from Ambari UI as it is exposed under Ranger Service Config tab. It is found under Advanced ranger-solr-configuration in content property entry with label as solr-config template. Restart Ranger Admin Component after saving the modified solrconfig to get it uploaded under znode.


Thanks @mvaradkar for writing this. This is a good find & useful info !

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.
Version history
Last update:
‎03-22-2017 11:23 AM
Updated by:
Top Kudoed Authors