LoginSignup
1
1

More than 3 years have passed since last update.

Homebrew Elasticsearch 起動直後にエラー

Last updated at Posted at 2021-02-07

結論

plugin の analysis-kuromoji のバージョンが古くエラーになっていた
analysis-kuromoji を再インストールで解決したがその工程で詰まったので残す

環境

  • macOS ver.10.15.6
  • Homebrew ver.2.7.1
  • Elasticsearch ver.7.10.1

解決までの流れ

Elasticsearchを起動後、起動状態を確認すると status error

👉 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 バージョン確認とlogファイルの確認

👉 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/

logファイルを確認すると kuromoji のバージョン違いの指摘を発見

elasticsearch.log
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

attempted to install release build of official plugin on snapshot build of 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 起動
status started になって成功 :tada: :tada: :tada:

👉 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

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1