Author: jleroux
Date: Sun Apr 16 19:44:50 2017
New Revision: 1791625
URL:
http://svn.apache.org/viewvc?rev=1791625&view=revLog:
Fixed: Could not obtain Lock on lucene index Lock
(OFBIZ-7265)
Problem:
I found this message in error.log
xer_default_products
DocumentIndexer
E
Could not obtain Lock on lucene index Lock held by this virtual machine:
C:\projectASF-Mars\ofbiz\runtime\indexes\products\write.lock
Investigation:
I am able to reproduce this on my dev machine.
Here is the steps to regenerate it:
1. Go to
https://localhost:8443/content/control/AdminIndex2. Click on Index Products button.
Solution:
As per my analysis, the reason of error is write lock on lucene indexes
(created by lucene indexing process in lucene component) by Solr.
Have a look on specialpurpose/solr/home/solrdefault/conf/solrconfig.xml line:
<dataDir>${solr.data.dir:runtime/indexes}</dataDir>
Should point to:
<dataDir>${solr.data.dir:specialpurpose/solr/home/solrdefault/runtime/indexes/}
</dataDir>
Solr currently pointing to lucene indexes and creating a lock on it.
We can't index products anymore using lucene indexing as it has lock from Solr.
So currently all the search results we can see on Solr Search
https://localhost:8443/solr/#/solrdefault/query
is lucene indexed results.
We have not created any indexes using Solr itself. Thanks
Thanks: Amardeep Singh Jhajj who did all the work
Modified:
ofbiz/ofbiz-plugins/trunk/solr/home/solrdefault/conf/solrconfig.xml
Modified: ofbiz/ofbiz-plugins/trunk/solr/home/solrdefault/conf/solrconfig.xml
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/solr/home/solrdefault/conf/solrconfig.xml?rev=1791625&r1=1791624&r2=1791625&view=diff==============================================================================
--- ofbiz/ofbiz-plugins/trunk/solr/home/solrdefault/conf/solrconfig.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/solr/home/solrdefault/conf/solrconfig.xml Sun Apr 16 19:44:50 2017
@@ -101,7 +101,7 @@
replication is in use, this should match the replication
configuration.
-->
- <dataDir>${solr.data.dir:runtime/indexes}</dataDir>
+ <dataDir>${solr.data.dir:plugins/solr/home/solrdefault/runtime/indexes/}</dataDir>
<!-- The DirectoryFactory to use for indexes.