java.io.EOFException: read past EOF: MMapIndexInput(path="/l/trunk/lucene/core/index/segments_1")

Apache's JIRA Issue Tracker | Billow Gao | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    1. Start a NEW IndexWriterBuilder on an empty folder, add some documents to the index 2. Call commit 3. When the segments_1 file with 0 byte was created, kill the JVM We will end with a corrupted index with an empty segments_1. We only have issue with the first commit crash. Also, if you tried to open an IndexSearcher on a new index. And the first commit on the index was not finished yet. Then you will see exception like: =========================================================================== org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.MMapDirectory@C:\tmp\testdir lockFactory=org.apache.lucene.store.NativeFSLockFactory@6ee00df: files: [write.lock, _0.fdt, _0.fdx] at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:741) at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:52) at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:65) =========================================================================== So when a new index was created, we should first create an empty index. We should not wait for the commit/close call to create the segment file. If we had an empty index there. It won't leave a corrupted index when there were a power issue on the first commit. And a concurrent IndexSearcher can access to the index(No match is better than exception).

    Apache's JIRA Issue Tracker | 4 years ago | Billow Gao
    java.io.EOFException: read past EOF: MMapIndexInput(path="/l/trunk/lucene/core/index/segments_1")
  2. 0

    How to fix SolrException, EOFException: read past EOF: MMapIndexInput?

    Stack Overflow | 3 years ago | Naresh
    org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Error opening new searcher
  3. 0

    Solr - User - stress testing Solr 4.x

    nabble.com | 1 year ago
    org.apache.solr.common.SolrException: Index fetch failed :
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Re: stress testing Solr 4.x

    lucene-solr-user | 4 years ago | Alain Rogister
    org.apache.solr.common.SolrException: Index fetch failed :
  6. 0

    Re: stress testing Solr 4.x

    lucene-solr-user | 4 years ago | Alain Rogister
    org.apache.solr.common.SolrException: Index fetch failed :

    Root Cause Analysis

    1. java.io.EOFException

      read past EOF: MMapIndexInput(path="/l/trunk/lucene/core/index/segments_1")

      at org.apache.lucene.store.ByteBufferIndexInput.readByte()
    2. Lucene
      IndexWriter.<init>
      1. org.apache.lucene.store.ByteBufferIndexInput.readByte(ByteBufferIndexInput.java:77)
      2. org.apache.lucene.store.ChecksumIndexInput.readByte(ChecksumIndexInput.java:41)
      3. org.apache.lucene.store.DataInput.readInt(DataInput.java:84)
      4. org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:285)
      5. org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:340)
      6. org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:668)
      7. org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:515)
      8. org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:336)
      9. org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:671)
      9 frames
    3. Unknown
      Test.main
      1. Test.main(Test.java:10)
      1 frame