1

When I try to to create an object of new IndexSearcher(fsDir) class it is throwing IOException read past EOF. The search index is not RAM based, it is NFS based (used FSDirectory lucene class).

I googled and got that this one

There is not permission issue, neither locked, I checked with lockhunter

So there must be write permission and none is using that directory.

It was working the past 2-3 months. Yesterday suddenly stopped working, all indexed files in the folder.

What else may cause to this exception? Is there something like if index is 2-3 month old (some period), then it gets expired and gives this exception?

Community
  • 1
  • 1
Elbek
  • 3,434
  • 6
  • 37
  • 49
  • I rebuild the index, then worked (took 2 hours), but still did not get why it sis not work before, after rebuild file size is the same – Elbek Oct 02 '12 at 15:15

2 Answers2

6

I got the answer, spending a lot of time on it, It will give that exception(IOException read past EOF):

If Directory does not give write permission
If someone else is using(locked)
If some segment is corrupted

For my case It was corrupted :(. But Exception does not say anything about this(Could tell some FIleCurroptedException). This is may help to someone else.

Elbek
  • 3,434
  • 6
  • 37
  • 49
0

Every time I got this, it had two index files (record) with same name (key - i am using mongo-lucene). I deleted the one of the record with empty buffer and it let me go forward without having to re-build the entire index. This seems like a multi-thread issue. Another trigger seem to be indexing non-text files

vkt
  • 439
  • 5
  • 6