This is the second part of bug 1373405 that I split into two bugs !ENTRY org.eclipse.epp.logging.aeri.ide 2 10 2016-09-06 09:52:27.896 !MESSAGE Updating the index from remote failed. ; version: 2.0.1.201608030901 !STACK 0 org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/tmp/1473148346752-0/segments_2"))): -11 (needs to be between 1071082519 and 1071082519). This version of Lucene only supports indexes created with release 4.0 and later. at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:299) at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:493) at org.apache.lucene.index.SegmentInfos$1.doBody(SegmentInfos.java:490) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:731) at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:683) at org.apache.lucene.index.SegmentInfos.readLatestCommit(SegmentInfos.java:490) at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:2487) at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory.replaceContent(ServerProblemsHistory.java:200) at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory$UpdateIndexJob.run(ServerProblemsHistory.java:298) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
The problem is that AERI downloads some indexes from the Internet and they are Lucene 3 indexes, which cannot be read by Lucene 5, which is what our version Eclipse uses. Since rh-java-common collection has both Lucene 4 and Lucene 5 available, my solution is to port the "eclipse-epp-logging" bundles, which supplies AERI, to use Lucene 4 instead, which *can* read Lucene 3 indexes.
Annoyingly, there is an error in Lucene 4's OSGi metadata that makes it difficult to use Lucene 4 and Lucene 5 in the same runtime, please see bug 1395709
> The problem is that AERI downloads some indexes from the Internet Mat, please, haven't you discovered a better method to "provoke" the exception, e.g. by some action in GUI? In bz1373405 I reported it somewhat vaguely (follow the log, wait, it will appear), it would be great to have a better reproducer...
(In reply to Václav Kadlčík from comment #3) > > The problem is that AERI downloads some indexes from the Internet > > Mat, please, haven't you discovered a better method to "provoke" the > exception, e.g. by some action in GUI? In bz1373405 I reported it somewhat > vaguely (follow the log, wait, it will appear), it would be great to have a > better reproducer... The work is done in a background thread scheduled for 5 minutes after start up, which is a time that is unfortunately hard-coded; there doesn't seem to be a way of triggering it to happen sooner from the UI. However, the exception does appear reliably in the log five minutes after the workbench starts up -- no UI interaction is necessary to observe the exception.
(In reply to Mat Booth from comment #4) > (In reply to Václav Kadlčík from comment #3) > > > The problem is that AERI downloads some indexes from the Internet > > > > Mat, please, haven't you discovered a better method to "provoke" the > > exception, e.g. by some action in GUI? In bz1373405 I reported it somewhat > > vaguely (follow the log, wait, it will appear), it would be great to have a > > better reproducer... > > The work is done in a background thread scheduled for 5 minutes after start > up, which is a time that is unfortunately hard-coded; there doesn't seem to > be a way of triggering it to happen sooner from the UI. > > However, the exception does appear reliably in the log five minutes after > the workbench starts up -- no UI interaction is necessary to observe the > exception. Just to clarify a little, my testing included doing this: $ rm -rf .eclipse/ workspace/ $ scl enable rh-eclipse46 "eclipse -clean -consoleLog -data workspace" ... and wait five minutes for the following output ... !ENTRY org.eclipse.epp.logging.aeri.ide 2 10 2016-11-17 14:29:52.089 !MESSAGE Updating the index from remote ‘https://aer.ctrlflow.com/downloads/redhat/problems.zip’ failed with exception: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/tmp/1479392991929-0/segments_1"))): -11 (needs to be between 1071082519 and 1071082519). This version of Lucene only supports indexes created with release 4.0 and later. ; version: 2.0.3.201610111629 !STACK 0 org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException at org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException.newTrace(Logs.java:387) at org.eclipse.epp.logging.aeri.core.util.Logs.log(Logs.java:134) at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory$UpdateIndexJob.run(ServerProblemsHistory.java:322) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) !ENTRY org.eclipse.epp.logging.aeri.ide 2 10 2016-11-17 14:29:54.438 !MESSAGE Updating the index from remote ‘https://www.eclipse.org/downloads/download.php?r=1&file=/technology/epp/logging/problems.zip’ failed with exception: org.apache.lucene.index.IndexFormatTooOldException: Format version is not supported (resource BufferedChecksumIndexInput(MMapIndexInput(path="/tmp/1479392994101-0/segments_2"))): -11 (needs to be between 1071082519 and 1071082519). This version of Lucene only supports indexes created with release 4.0 and later. ; version: 2.0.3.201610111629 !STACK 0 org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException at org.eclipse.epp.logging.aeri.core.util.Logs$LogTraceException.newTrace(Logs.java:387) at org.eclipse.epp.logging.aeri.core.util.Logs.log(Logs.java:134) at org.eclipse.epp.internal.logging.aeri.ide.server.mars.ServerProblemsHistory$UpdateIndexJob.run(ServerProblemsHistory.java:322) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
When using the fixed build, after five minutes you should see no errors and you can observe the downloaded indexes have been successfully written to disk: $ ll workspace/.metadata/.plugins/org.eclipse.epp.logging.aeri.ide/org.eclipse.epp.logging.aeri.ide.server/remote-history/ total 19496 -rw-rw-r--. 1 mbooth mbooth 251762 Nov 17 14:54 _1.fdt -rw-rw-r--. 1 mbooth mbooth 38428 Nov 17 14:54 _1.fdx -rw-rw-r--. 1 mbooth mbooth 62 Nov 17 14:54 _1.fnm -rw-rw-r--. 1 mbooth mbooth 1469247 Nov 17 14:54 _1.frq -rw-rw-r--. 1 mbooth mbooth 4807 Nov 17 14:54 _1.nrm -rw-rw-r--. 1 mbooth mbooth 2685828 Nov 17 14:54 _1.prx -rw-rw-r--. 1 mbooth mbooth 310 Nov 17 14:54 _1.si -rw-rw-r--. 1 mbooth mbooth 141416 Nov 17 14:54 _1.tii -rw-rw-r--. 1 mbooth mbooth 15337911 Nov 17 14:54 _1.tis -rw-rw-r--. 1 mbooth mbooth 29 Nov 17 14:54 _1_upgraded.si -rw-rw-r--. 1 mbooth mbooth 89 Nov 17 14:54 segments_2 -rw-rw-r--. 1 mbooth mbooth 36 Nov 17 14:54 segments.gen -rw-rw-r--. 1 mbooth mbooth 0 Nov 17 14:49 write.lock
Thanks, Mat, for all the information. rh-eclipse46-eclipse-epp-logging-2.0.3-1.2.el7 + rh-java-common-lucene-4.8.0-6.8.el7 (bz1395709#c9) work for me.
just FTR, re-verified with * rh-eclipse46-eclipse-epp-logging-2.0.3-1.2.el7, and * rh-java-common-lucene-4.8.0-6.8.el7 of 2016:25764 (i.e. the "official" build)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2852.html