Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?

posted at

updated at

Organization

Homebrew Elasticsearch 起動直後にエラー

結論

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

参考

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?