Homebrew Elasticsearch 启动后立即出现错误

得出結論

插件的kuromoji分析器版本过旧,导致出现错误。
重新安装了analysis-kuromoji插件才解决了问题,但在此过程中遇到了困难,因此保留下来。

环境

    • macOS ver.10.15.6

 

    • Homebrew ver.2.7.1

 

    Elasticsearch ver.7.10.1

解决过程

启动 Elasticsearch 后,检查其状态时,显示为错误状态。

? brew services start elasticsearch
==> Successfully started `elasticsearch` (label: homebrew.mxcl.elasticsearch)

? brew services list                                                                                                                                                       ✘ 78
Name          Status  User Plist
elasticsearch error   shun /Users/shun/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist

确认Elasticsearch版本以及日志文件的确认。

? brew info elasticsearch                                                                                                                                                   ✘ 1
elasticsearch: stable 7.10.1 (bottled)

~~省略~~

==> Caveats
Data:    /usr/local/var/lib/elasticsearch/
Logs:    /usr/local/var/log/elasticsearch/elasticsearch.log
Plugins: /usr/local/var/elasticsearch/plugins/
Config:  /usr/local/etc/elasticsearch/

当查看日志文件时,发现了有关 kuromoji 版本差异的指示。

java.lang.IllegalArgumentException: Plugin [analysis-kuromoji] was built for Elasticsearch version 7.9.1 but version 7.10.0 is running

重新安装kuromoji。。。我原以为会成功,但安装失败了。

? sudo elasticsearch-plugin remove analysis-kuromoji
-> removing [analysis-kuromoji]...

? sudo elasticsearch-plugin install analysis-kuromoji
-> Installing analysis-kuromoji
-> Failed installing analysis-kuromoji
-> Rolling back analysis-kuromoji
-> Rolled back analysis-kuromoji
ERROR: attempted to install release build of official plugin on snapshot build of Elasticsearch

尝试将官方插件的发布构建安装在Elasticsearch的快照构建上。

尝试安装官方插件到 Elasticsearch 快照版本构建时发生错误?

最后,参考Elasticsearch官方和(Mac)homebrew的方法,进行了Elasticsearch 7.8.0和analysis-kuromoji插件的离线安装。

? /usr/local/Cellar/elasticsearch/7.10.1/bin/elasticsearch-plugin install https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-kuromoji/analysis-kuromoji-7.10.1.zip
-> Installing https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-kuromoji/analysis-kuromoji-7.10.1.zip
-> Downloading https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-kuromoji/analysis-kuromoji-7.10.1.zip
[=================================================] 100%  
-> Installed analysis-kuromoji

检查 kuromoji 的安装并重新启动 Elasticsearch,状态变为 started,表示成功。

? elasticsearch-plugin list
analysis-kuromoji

? brew services start elasticsearch
==> Successfully started `elasticsearch` (label: homebrew.mxcl.elasticsearch)

? brew services list
Name          Status  User Plist
elasticsearch started shun /Users/shun/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist

请在中国人口普查中查阅

    • Elasticsearch 公式 kuromoji インストール

 

    (Mac)homebrewでElasticsearch 7.8.0とanalysis-kuromojiプラグインのインストール
广告
将在 10 秒后关闭
bannerAds