Issue

Error occurred while copying file

18.05.2016 05:22:45.576 *WARN* [oak-lucene-0] org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier [oak:index/lucene] Error occurred while copying file [segments_6] from Directory for /oak:index/lucene to MMapDirectory@crx-quickstart/repository/index/ecd8ca46812604a909af4a3571c7c0ba708592723d0e67134e8a44b75456682c/0 lockFactory=NativeFSLockFactory@crx-quickstart/repository/index/ecd8ca46812604a909af4a3571c7c0ba708592723d0e67134e8a44b75456682c/0
java.io.FileNotFoundException: segments_6
at org.apache.jackrabbit.oak.plugins.index.lucene.OakDirectory.openInput(OakDirectory.java:133)
at org.apache.lucene.store.Directory.copy(Directory.java:185)
at org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier$CopyOnReadDirectory.copyFilesToLocal(IndexCopier.java:420)
at org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier$CopyOnReadDirectory.access$600(IndexCopier.java:296)
at org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier$CopyOnReadDirectory$1.run(IndexCopier.java:379)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

codec header mismatch

07.12.2016 02:09:40.468 *WARN* 192.168.1.5 [1481094580317] POST /bin/test.json HTTP/1.1] org.apache.jackrabbit.oak.plugins.index.lucene.IndexCopier [/oak:index/lucene] Found local copy for _0.cfs in MMapDirectory@crx-quickstart/repository/index/fa3408cae8305c809886bb043f35b7da7e69285d2d192e089198dfea3a3ccc84/1 lockFactory=NativeFSLockFactory@crx-quickstart/repository/index/fa3408cae8305c809886bb043f35b7da7e69285d2d192e089198dfea3a3ccc84/1 but size of local 636425 differs from remote 636106. Content would be read from remote file only
07.12.2016 02:09:40.476 *ERROR* [19.163.192.105 [1481094580317] POST /bin/test.json HTTP/1.1] org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker Could not access the Lucene index at /oak:index/lucene
org.apache.lucene.index.CorruptIndexException: codec header mismatch: actual header=-16777216 vs expected header=1071082519 (resource: SlicedIndexInput(SlicedIndexInput(_0.fnm in _0.cfs) in _0.cfs slice=626286:636425))
at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:128)
at org.apache.lucene.codecs.lucene46.Lucene46FieldInfosReader.read(Lucene46FieldInfosReader.java:56)
at org.apache.lucene.index.SegmentReader.readFieldInfos(SegmentReader.java:215)
at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:95)
at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:62)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:843)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:52)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:66)
at org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode.<init>(IndexNode.java:103)
at org.apache.jackrabbit.oak.plugins.index.lucene.IndexNode.open(IndexNode.java:69)
at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker.findIndexNode(IndexTracker.java:179)
at org.apache.jackrabbit.oak.plugins.index.lucene.IndexTracker.acquireIndexNode(IndexTracker.java:154)
at org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndex.getPlans(LucenePropertyIndex.java:220)

Cause

The local copy of the lucene index is likely corrupted.

Resolution

To fix the issue, we can rebuild the local index copy:

  1. Stop AEM
  2. Delete crx-quickstart/repository/index
  3. Start AEM

If that doesn't fix the issue, contact AEM Customer Care for help.  In the meantime, as a workaround to get search working again, but with a performance hit, do the following:

  1. Go to http://host:port/system/console/configMgr/org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService
  2. Disable / uncheck the Copy on Read and Copy on Write boxes
  3. Save

Esta obra está licenciada sob uma licença não adaptada da Creative Commons Attribution-Noncommercial-Share Alike 3.0  As publicações do Twitter™ e do Facebook não são cobertas pelos termos do Creative Commons.

Avisos legais   |   Política de privacidade online