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 Harini Raghavan <ha...@insideview.com> on 2005/09/12 22:46:38 UTC

Stale NFS file handle Exception

Hi All,
I have 2 servers in the production environment, one running some Quartz 
jobs and the other one running the application. There is a common NFS 
mount which has the lucene index directory. The jobs fetch the latest 
data and update the lucene index. And the user can search on the index 
to retrieve documents. When I search on the index on nfs while the jobs 
are being run, I get the following exception :
 
 java.io.IOException: Stale NFS file handle
  at java.io.RandomAccessFile.readBytes(Native Method)
  at java.io.RandomAccessFile.read(RandomAccessFile.java:315)
  at 
org.apache.lucene.store.FSInputStream.readInternal(FSDirectory.java:420)
  at org.apache.lucene.store.InputStream.readBytes(InputStream.java:61)
  at 
org.apache.lucene.index.CompoundFileReader$CSInputStream.readInternal(CompoundFileReader.java:220)
  at org.apache.lucene.store.InputStream.refill(InputStream.java:158)
  at org.apache.lucene.store.InputStream.readByte(InputStream.java:43)
  at org.apache.lucene.store.InputStream.readVInt(InputStream.java:83)
  at 
org.apache.lucene.index.SegmentTermEnum.readTerm(SegmentTermEnum.java:142)
  at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:115)
  at 
org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:143)
  at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:137)
  at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:51)
  at org.apache.lucene.index.MultiTermDocs.termDocs(MultiReader.java:409)
  at org.apache.lucene.index.MultiTermDocs.read(MultiReader.java:377)

Can I have the index directory on a common nfs mount? Does lucene 
support this?
Any help would be greatly appreciated.
Thank you,
Harini


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


Re: Stale NFS file handle Exception

Posted by Oren Shir <sh...@gmail.com>.
Hi,

There is an issue with file locking and NFS, which requirs setting some
system property for lock files directory that must be local. Might be
relevant.

Oren

On 9/21/05, John Wang <jo...@gmail.com> wrote:
>
> How do you "update" the index?
>
> -John
>
> On 9/12/05, Harini Raghavan <ha...@insideview.com> wrote:
> >
> > Hi All,
> > I have 2 servers in the production environment, one running some Quartz
> > jobs and the other one running the application. There is a common NFS
> > mount which has the lucene index directory. The jobs fetch the latest
> > data and update the lucene index. And the user can search on the index
> > to retrieve documents. When I search on the index on nfs while the jobs
> > are being run, I get the following exception :
> >
> > java.io.IOException: Stale NFS file handle
> > at java.io.RandomAccessFile.readBytes(Native Method)
> > at java.io.RandomAccessFile.read(RandomAccessFile.java:315)
> > at
> > org.apache.lucene.store.FSInputStream.readInternal(FSDirectory.java:420)
> > at org.apache.lucene.store.InputStream.readBytes(InputStream.java:61)
> > at
> > org.apache.lucene.index.CompoundFileReader$CSInputStream.readInternal(
> > CompoundFileReader.java:220)
> > at org.apache.lucene.store.InputStream.refill(InputStream.java:158)
> > at org.apache.lucene.store.InputStream.readByte(InputStream.java:43)
> > at org.apache.lucene.store.InputStream.readVInt(InputStream.java:83)
> > at
> > org.apache.lucene.index.SegmentTermEnum.readTerm(SegmentTermEnum.java
> :142)
> > at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java
> :115)
> > at
> > org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java
> :143)
> > at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:137)
> > at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:51)
> > at org.apache.lucene.index.MultiTermDocs.termDocs(MultiReader.java:409)
> > at org.apache.lucene.index.MultiTermDocs.read(MultiReader.java:377)
> >
> > Can I have the index directory on a common nfs mount? Does lucene
> > support this?
> > Any help would be greatly appreciated.
> > Thank you,
> > Harini
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> >
> >
>
>

Re: Stale NFS file handle Exception

Posted by John Wang <jo...@gmail.com>.
How do you "update" the index?

-John

On 9/12/05, Harini Raghavan <ha...@insideview.com> wrote:
> 
> Hi All,
> I have 2 servers in the production environment, one running some Quartz
> jobs and the other one running the application. There is a common NFS
> mount which has the lucene index directory. The jobs fetch the latest
> data and update the lucene index. And the user can search on the index
> to retrieve documents. When I search on the index on nfs while the jobs
> are being run, I get the following exception :
> 
> java.io.IOException: Stale NFS file handle
> at java.io.RandomAccessFile.readBytes(Native Method)
> at java.io.RandomAccessFile.read(RandomAccessFile.java:315)
> at
> org.apache.lucene.store.FSInputStream.readInternal(FSDirectory.java:420)
> at org.apache.lucene.store.InputStream.readBytes(InputStream.java:61)
> at
> org.apache.lucene.index.CompoundFileReader$CSInputStream.readInternal(
> CompoundFileReader.java:220)
> at org.apache.lucene.store.InputStream.refill(InputStream.java:158)
> at org.apache.lucene.store.InputStream.readByte(InputStream.java:43)
> at org.apache.lucene.store.InputStream.readVInt(InputStream.java:83)
> at
> org.apache.lucene.index.SegmentTermEnum.readTerm(SegmentTermEnum.java:142)
> at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:115)
> at
> org.apache.lucene.index.TermInfosReader.scanEnum(TermInfosReader.java:143)
> at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:137)
> at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:51)
> at org.apache.lucene.index.MultiTermDocs.termDocs(MultiReader.java:409)
> at org.apache.lucene.index.MultiTermDocs.read(MultiReader.java:377)
> 
> Can I have the index directory on a common nfs mount? Does lucene
> support this?
> Any help would be greatly appreciated.
> Thank you,
> Harini
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>