Error during startup

Hi,

I receive this error during startup:
[ERROR][o.e.b.Elasticsearch ] [s2ab00jb.be.srv.dev.sys] fatal exception while booting Elasticsearch
java.lang.IllegalArgumentException: Could not load codec 'Lucene94'. Did you forget to add lucene-backward-codecs.jar?

Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene94' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [Lucene92, Lucene70, Lucene80, Lucene84, Lucene86, Lucene87, Lucene90, Lucene91, BWCLucene70Codec, Lucene62, Lucene60, SimpleText]

What may cause this?
thx!

What version of Elasticsearch are you running?
What does yout config look like?
What is the full log?

Hi,

version:
Version: 8.6.2, Build: rpm/2d58d0f136141f03239816a4e360a8d17b6d8f29/2023-02-13T09:35:20.314882762Z, JVM: 19.0.2

You want to see something specific from the config?
Complete log:

[2023-03-14T13:59:04,779][ERROR][o.e.b.Elasticsearch      ]  fatal exception while booting Elasticsearch
java.lang.IllegalArgumentException: Could not load codec 'Lucene94'. Did you forget to add lucene-backward-codecs.jar?
        at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:515) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.SegmentInfos.parseSegmentInfos(SegmentInfos.java:404) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:363) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:299) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:88) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:77) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:809) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:109) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:67) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:60) ~[lucene-core-9.3.0.jar:?]
        at org.elasticsearch.gateway.PersistedClusterStateService.nodeMetadata(PersistedClusterStateService.java:322) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.env.NodeEnvironment.loadNodeMetadata(NodeEnvironment.java:599) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:326) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.node.Node.<init>(Node.java:456) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.node.Node.<init>(Node.java:311) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:214) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214) ~[elasticsearch-8.4.2.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) ~[elasticsearch-8.4.2.jar:?]
        Suppressed: org.apache.lucene.index.CorruptIndexException: checksum passed (b8f9f84b). possibly transient resource issue, or a Lucene or JVM bug (resource=BufferedChecksumIndexInput(NIOFSIndexInput(path="/var/lib/elasticsearch/_state/segments_1ury")))
                at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:500) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:370) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.SegmentInfos.readCommit(SegmentInfos.java:299) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:88) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:77) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:809) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:109) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:67) ~[lucene-core-9.3.0.jar:?]
                at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:60) ~[lucene-core-9.3.0.jar:?]
                at org.elasticsearch.gateway.PersistedClusterStateService.nodeMetadata(PersistedClusterStateService.java:322) ~[elasticsearch-8.4.2.jar:?]
                at org.elasticsearch.env.NodeEnvironment.loadNodeMetadata(NodeEnvironment.java:599) ~[elasticsearch-8.4.2.jar:?]
                at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:326) ~[elasticsearch-8.4.2.jar:?]
                at org.elasticsearch.node.Node.<init>(Node.java:456) ~[elasticsearch-8.4.2.jar:?]
                at org.elasticsearch.node.Node.<init>(Node.java:311) ~[elasticsearch-8.4.2.jar:?]
                at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:214) ~[elasticsearch-8.4.2.jar:?]
                at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214) ~[elasticsearch-8.4.2.jar:?]
                at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67) ~[elasticsearch-8.4.2.jar:?]
Caused by: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'Lucene94' does not exist.  You need to add the corresponding JAR file supporting this SPI to your classpath.  The current classpath supports the following names: [Lucene92, Lucene70, Lucene80, Lucene84, Lucene86, Lucene87, Lucene90, Lucene91, BWCLucene70Codec, Lucene62, Lucene60, SimpleText]
        at org.apache.lucene.util.NamedSPILoader.lookup(NamedSPILoader.java:113) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.codecs.Codec.forName(Codec.java:118) ~[lucene-core-9.3.0.jar:?]
        at org.apache.lucene.index.SegmentInfos.readCodec(SegmentInfos.java:511) ~[lucene-core-9.3.0.jar:?]

All of it please. Same with the log.

You said Elasticsearch 8.6.2 but the version running is elasticsearch-8.4.2.jar.

Did you try to downgrade?

1 Like

Hi David,

Good remark! I have checked and it seems there was an downgrade triggered some time ago. I have tried to reinstall version 8.6.2 but still the same error during startup. Any idea?

Could you share the full logs again?

Hi David,

Elasticsearch is running again after update to version 8.6.2. So it seems the downgrade cause the issue. Thanks for the help!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.