roopteja
roopteja

Reputation: 743

IndexFormatTooNew Exception in Elastic Search Installation (6.5.4)

I have downloaded Elasticsearch6.5.4 msi installer exe from Elastic Search Downloads page. I have installed Elastic search as shown in Installer Procedure in the website. When I am trying to run or start the elastic Search I am getting below error.

Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource BufferedChecksumIndexInput(SimpleFSIndexInput(path="C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.keystore"))): 4 (needs to be between 1 and 3)
Likely root cause: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource BufferedChecksumIndexInput(SimpleFSIndexInput(path="C:\ProgramData\Elastic\Elasticsearch\config\elasticsearch.keystore"))): 4 (needs to be between 1 and 3)
        at org.apache.lucene.codecs.CodecUtil.checkHeaderNoMagic(CodecUtil.java:216)
        at org.apache.lucene.codecs.CodecUtil.checkHeader(CodecUtil.java:198)
        at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:217)
        at org.elasticsearch.bootstrap.Bootstrap.loadSecureSettings(Bootstrap.java:230)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:295)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:136)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:127)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:86)
Refer to the log for complete error details.
Java HotSpot(TM) 64-Bit Server VM warning: Cannot open file logs/gc.log due to No such file or directory

Please help me how to go forward with this installation.

Upvotes: 0

Views: 4319

Answers (2)

drweird
drweird

Reputation: 415

On MacOS (Big Sur) I had to remove Elastic search then remove the config files from another dir:

rm -rf /usr/local/var/lib/elasticsearch

After that, I could reinstall successfully.

Upvotes: 0

Tayyab Hussain
Tayyab Hussain

Reputation: 1838

I had the same issue. Removing Elasticsearch does not remove config files. In centOs I removed elastic search by

rpm -qa | grep "elasticsearch"
rpm -e --nodeps "output-of-above-command"

After that I removed elasticsearch folders from /etc and /usr/share

rm -rf /etc/elasticsearch
rm -rf /usr/share/elasticsearch

After that you can install the required version.

Upvotes: 2

Related Questions