Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (2)
Rising Star

Quick post to add an auto fix for Solr infra lock issue.
Ranger server under :
/usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf

Edit the file solrconfig.xml

Uncomment and change <unlockOnStartup>false</unlockOnStartup>  to <unlockOnStartup>true</unlockOnStartup>

Submit the new xml:

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

Increase the sleep time from 5 to 30 seconds in /opt/lucidworks-hdpsearch/solr/bin/solr

sed -i 's/(sleep 5)/(sleep 30)/g'/opt/lucidworks-hdpsearch/solr/bin/solr

Or in the following :

sed -i 's/(sleep 5)/(sleep 30)/g' /usr/lib/ambari-infra-solr/bin/solr 

you can also add in the script the following command :

hadoop fs -rm /user/infra-solr/ranger_audits/core_node1/data/index/write.lock 
186 Views
0 Kudos
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎03-09-2018 02:24 PM
Updated by:
 
Contributors
Top Kudoed Authors