Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (2)
avatar
Expert Contributor

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 
750 Views
0 Kudos
Version history
Last update:
‎03-09-2018 02:24 PM
Updated by:
Contributors