You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tri Nguyen <tr...@yahoo.com> on 2010/12/31 01:38:03 UTC

exception obtaining write lock on startup

Hi,
 
I'm getting this exception when I have 2 cores as masters.  Seems like one of the cores obtains a lock (file) and then the other tries to obtain the same one.   However, the first one is not deleted.
 
How do I fix this?
 
Dec 30, 2010 4:34:48 PM org.apache.solr.handler.ReplicationHandler inform
WARNING: Unable to get IndexCommit on startup
org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: Native
FSLock@..\webapps\solr\tnsolr\data\index\lucene-fe3fc928a4bbfeb55082e49b32a70c10
-write.lock
        at org.apache.lucene.store.Lock.obtain(Lock.java:85)
        at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1565)
        at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1421)
        at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:19
1)
        at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHand
ler.java:98)
        at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHa
ndler2.java:173)
        at org.apache.solr.update.DirectUpdateHandler2.forceOpenWriter(DirectUpd
ateHandler2.java:376)
        at org.apache.solr.handler.ReplicationHandler.inform(ReplicationHandler.
 
 
Tri

Re: exception obtaining write lock on startup

Posted by samarth s <sa...@gmail.com>.
In that case why is there a separate lock factory of SingleInstanceLockFactory?

On Fri, Dec 31, 2010 at 6:25 AM, Lance Norskog <go...@gmail.com> wrote:
> This will not work. At all.
>
> You can only have one Solr core instance changing an index.
>
> On Thu, Dec 30, 2010 at 4:38 PM, Tri Nguyen <tr...@yahoo.com> wrote:
>> Hi,
>>
>> I'm getting this exception when I have 2 cores as masters.  Seems like one of the cores obtains a lock (file) and then the other tries to obtain the same one.   However, the first one is not deleted.
>>
>> How do I fix this?
>>
>> Dec 30, 2010 4:34:48 PM org.apache.solr.handler.ReplicationHandler inform
>> WARNING: Unable to get IndexCommit on startup
>> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: Native
>> FSLock@..\webapps\solr\tnsolr\data\index\lucene-fe3fc928a4bbfeb55082e49b32a70c10
>> -write.lock
>>         at org.apache.lucene.store.Lock.obtain(Lock.java:85)
>>         at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1565)
>>         at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1421)
>>         at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:19
>> 1)
>>         at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHand
>> ler.java:98)
>>         at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHa
>> ndler2.java:173)
>>         at org.apache.solr.update.DirectUpdateHandler2.forceOpenWriter(DirectUpd
>> ateHandler2.java:376)
>>         at org.apache.solr.handler.ReplicationHandler.inform(ReplicationHandler.
>>
>>
>> Tri
>
>
>
> --
> Lance Norskog
> goksron@gmail.com
>

Re: exception obtaining write lock on startup

Posted by Lance Norskog <go...@gmail.com>.
This will not work. At all.

You can only have one Solr core instance changing an index.

On Thu, Dec 30, 2010 at 4:38 PM, Tri Nguyen <tr...@yahoo.com> wrote:
> Hi,
>
> I'm getting this exception when I have 2 cores as masters.  Seems like one of the cores obtains a lock (file) and then the other tries to obtain the same one.   However, the first one is not deleted.
>
> How do I fix this?
>
> Dec 30, 2010 4:34:48 PM org.apache.solr.handler.ReplicationHandler inform
> WARNING: Unable to get IndexCommit on startup
> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: Native
> FSLock@..\webapps\solr\tnsolr\data\index\lucene-fe3fc928a4bbfeb55082e49b32a70c10
> -write.lock
>         at org.apache.lucene.store.Lock.obtain(Lock.java:85)
>         at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1565)
>         at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1421)
>         at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:19
> 1)
>         at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHand
> ler.java:98)
>         at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHa
> ndler2.java:173)
>         at org.apache.solr.update.DirectUpdateHandler2.forceOpenWriter(DirectUpd
> ateHandler2.java:376)
>         at org.apache.solr.handler.ReplicationHandler.inform(ReplicationHandler.
>
>
> Tri



-- 
Lance Norskog
goksron@gmail.com