You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Antony Bowesman <ad...@teamware.com> on 2007/03/31 10:02:34 UTC

Help - FileNotFoundException during IndexWriter.init()

I got the following exception this morning when running one last test on a data 
set that has been indexed many times before over the past few months.

java.io.FileNotFoundException: 
D:\72ed1\server\Java\Search\00000008\index\00000001\segments_gq9 (Access is denied)
         at java.io.RandomAccessFile.open(Native Method)
         at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
         at 
org.apache.lucene.store.FSIndexInput$Descriptor.<init>(FSDirectory.java:497)
         at org.apache.lucene.store.FSIndexInput.<init>(FSDirectory.java:522)
         at org.apache.lucene.store.FSDirectory.openInput(FSDirectory.java:434)
         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:180)
         at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:235)
         at 
org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:579)
         at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:232)
         at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:385)
         at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:276)

On Windows with Lucene 2.1.

The test was run with only a single thread handling an incoming queue of 155K 
requests with ~200K documents so there is no concurrency issue.  There is no 
optimisation going on.  I am warming a new searcher every minute (for load) 
using a new reader.

I know that one of the files being indexed has a virus and when I came back to 
the machine the virus scanner had popped up at some point, so my suspicions are 
that it is the cause.  I am running the test again, but can any of the gurus 
give any ideas what can cause this.

It did have to happen the day after my deadline :(

Antony



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Help - FileNotFoundException during IndexWriter.init()

Posted by Michael McCandless <lu...@mikemccandless.com>.
"Antony Bowesman" <ad...@teamware.com> wrote:
> Michael McCandless wrote:
> 
> >> Yes, I've disabled it currently while the new test runs.  Let's see. 
> >> I'll re-run the test a few more times and see if I can re-create the problem.
> > 
> > OK let's see if that makes it go away!  Hopefully :)
> 
> I ran the tests several times over the weekend with no virus checker in the DB 
> directory and haven't managed to reproduce the problem.
> 
> Thanks for the help Mike.  Nothing like an exception never seen before, two days 
> before the product is due to go live, to induce mild panic ;)

Phew, I'm glad to hear that!  Thanks for bringing closure to this.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Help - FileNotFoundException during IndexWriter.init()

Posted by Antony Bowesman <ad...@teamware.com>.
Michael McCandless wrote:

>> Yes, I've disabled it currently while the new test runs.  Let's see. 
>> I'll re-run the test a few more times and see if I can re-create the problem.
> 
> OK let's see if that makes it go away!  Hopefully :)

I ran the tests several times over the weekend with no virus checker in the DB 
directory and haven't managed to reproduce the problem.

Thanks for the help Mike.  Nothing like an exception never seen before, two days 
before the product is due to go live, to induce mild panic ;)

Antony


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Help - FileNotFoundException during IndexWriter.init()

Posted by Michael McCandless <lu...@mikemccandless.com>.
"Antony Bowesman" <ad...@teamware.com> wrote:
> Michael McCandless wrote:
> > 
> > Hmmm.  It seems like what's happening is the file in fact exists but
> > Lucene gets "Access is denied" when trying to read it.  Lucene takes a
> > listing of the directory, first.  So if it Lucene has permission to
> > take a directory listing but then no permission to open the segments_N
> > file for reading, that would cause this exception.
> > 
> > Is it possible that your virus checker thought the segments_gq9 file
> > had a virus and turned off "read permisson" in the ACLs for it?  Can
> > you check to see which specific file(s) it thought had viruses?
> 
> What's in the segments file?  The virus would have existed in one of the 
> attachments in another directory queued for indexing.  Those files are queued by 
> a process that has no involvement with the indexing and has not caused a problem 
> on another machine with Mcafee on it.  This one has F-Secure.

The segments file is a very small binary file that contains the
details of each segment in the index.  If the virus checker didn't
quarantine your segments file then I'm not sure what else would have
caused "Access denied" when Lucene tried to open the segments file for
reading...
 
> Unfortunately I was too quick to cancel the message as assumed it was not a 
> problem until I looked at the test logs.
> 
> > Is it possible to tell the virus checker NOT to not check files in
> > your Lucene index directory?
> 
> Yes, I've disabled it currently while the new test runs.  Let's see. 
> I'll re-run the test a few more times and see if I can re-create the problem.

OK let's see if that makes it go away!  Hopefully :)

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Help - FileNotFoundException during IndexWriter.init()

Posted by Antony Bowesman <ad...@teamware.com>.
Michael McCandless wrote:
> 
> Hmmm.  It seems like what's happening is the file in fact exists but
> Lucene gets "Access is denied" when trying to read it.  Lucene takes a
> listing of the directory, first.  So if it Lucene has permission to
> take a directory listing but then no permission to open the segments_N
> file for reading, that would cause this exception.
> 
> Is it possible that your virus checker thought the segments_gq9 file
> had a virus and turned off "read permisson" in the ACLs for it?  Can
> you check to see which specific file(s) it thought had viruses?

What's in the segments file?  The virus would have existed in one of the 
attachments in another directory queued for indexing.  Those files are queued by 
a process that has no involvement with the indexing and has not caused a problem 
on another machine with Mcafee on it.  This one has F-Secure.

Unfortunately I was too quick to cancel the message as assumed it was not a 
problem until I looked at the test logs.

> Is it possible to tell the virus checker NOT to not check files in
> your Lucene index directory?

Yes, I've disabled it currently while the new test runs.  Let's see.  I'll 
re-run the test a few more times and see if I can re-create the problem.

Thanks for the rapid response Mike
Antony





---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Help - FileNotFoundException during IndexWriter.init()

Posted by Michael McCandless <lu...@mikemccandless.com>.
"Antony Bowesman" <ad...@teamware.com> wrote:
> I got the following exception this morning when running one last test on a data 
> set that has been indexed many times before over the past few months.
>
> java.io.FileNotFoundException:
> D:\72ed1\server\Java\Search\00000008\index\00000001\segments_gq9 (Access is denied)

Hmmm.  It seems like what's happening is the file in fact exists but
Lucene gets "Access is denied" when trying to read it.  Lucene takes a
listing of the directory, first.  So if it Lucene has permission to
take a directory listing but then no permission to open the segments_N
file for reading, that would cause this exception.

Is it possible that your virus checker thought the segments_gq9 file
had a virus and turned off "read permisson" in the ACLs for it?  Can
you check to see which specific file(s) it thought had viruses?

Is it possible to tell the virus checker NOT to not check files in
your Lucene index directory?

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org