ElasticSearch 5.6无法在Mac OS上启动
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ElasticSearch 5.6无法在Mac OS上启动相关的知识,希望对你有一定的参考价值。
用Brew安装后,我无法在Mac上启动ElasticSearch 5.6服务器。得到此错误:
$ /usr/local/opt/elasticsearch@5.6/bin/elasticsearch
Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource BufferedChecksumIndexInput(SimpleFSIndexInput(path="/usr/local/etc/elasticsearch/elasticsearch.keystore"))): 3 (needs to be between 1 and 2)
Likely root cause: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported (resource BufferedChecksumIndexInput(SimpleFSIndexInput(path="/usr/local/etc/elasticsearch/elasticsearch.keystore"))): 3 (needs to be between 1 and 2)
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:175)
at org.elasticsearch.bootstrap.Bootstrap.loadSecureSettings(Bootstrap.java:246)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:304)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:132)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:123)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:70)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:134)
at org.elasticsearch.cli.Command.main(Command.java:90)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84)
Refer to the log for complete error details.
由于它不是ElasticSearch的最新版本,我认为它安装了一些不兼容的软件包版本,但不确定是哪个软件包。
任何人都可以帮助它的工作吗?
答案
我刚才有同样的问题,重新生成密钥库为我解决了问题。以下是我采取的步骤:
备份现有密钥库:
cd /usr/local/etc/elasticsearch/
mv elasticsearch.keystore elasticsearch.keystore.old
生成新的密钥库:
cd /usr/local/Cellar/elasticsearch@5.6/5.6.15/libexec/bin/
elasticsearch-keystore create
另一答案
服务器很可能正在尝试读取较新的索引(org.apache.lucene.index.IndexFormatTooNewException
)。
最有可能的唯一方法是完全摆脱它:
sudo rm -rf /usr/local/var/lib/elasticsearch
请仔细检查索引并确保您不再需要旧的6. *索引,因为您显然会丢失它。
以上是关于ElasticSearch 5.6无法在Mac OS上启动的主要内容,如果未能解决你的问题,请参考以下文章
在 Mac 10.11 上使用 QT 5.6 构建 QtWebKit