Help us understand the problem. What is going on with this article?

ElasticsearchでIndexがRead-Onlyになった時の対処方法

More than 1 year has passed since last update.

Elasticseachのインデックスにロックがかかり、インデックスに書き込むことができなくなる。
その時の対処方法について書きます。

構成について

  • OS : Amazon Linux AMI 2017.09.1 (HVM)
  • Elasticsearch 6.1.1
  • Kibana 6.1.1

エラーメッセージ

以下がElasticsearch.logに書き込まれます。
また、Kibanaにアクセスしたときも同様のエラーメッセージが出ます。

### elasticsearch.log
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];

対処方法

ディスクのしきい値に達してしまい、ディスクを拡張しても解消されない。
全てのインデックスにロックがかかっているので、以下のコマンドで解除する必要がある。

$ curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'

これで問題なくKibanaで操作が可能になるかと思います。
ありがとうございました

参考

Why do not you register as a user and use Qiita more conveniently?
  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
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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