lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <>
Subject Re: Unable to obtain lock?
Date Tue, 22 Jun 2004 03:56:44 GMT

Locking in Lucene has changed since version 1.2.  In that version lock
files were stored in the index directory, while in the version you are
using now they are stored in the system's temporary directory by
default.  Furthermore, their names have changed.  Therefore, make sure
that your temporary directory is writable by the user who is running
your Lucene application.  I use Lucene on Linux, so I do this when I
get locking errors like yours:

prompt> ls -al /tmp | grep -i lucene

If the found file looks stale, I manually remove it (rm ...).
You can also programmatically force unlocking of an index, if you want.

Finally, there is a Wiki page showing how you can change the directory
to store lock files, using system properties.  This can be handy if
your temp directory is not writable or some such.


--- Steve Rajavuori <> wrote:
> I am seeing the following error when trying to open IndexWriter. I am
> now
> using Lucene 1.4-RC3, but I was previously using 1.2 to create this
> index.
> Any suggestions of how to fix this problem?
> Lock obtain timed out
> 	at
> 	at org.apache.lucene.index.IndexWriter.<init>(
> 	at org.apache.lucene.index.IndexWriter.<init>(
> Steve Rajavuori
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message