{"id":3814,"date":"2021-06-08T07:17:31","date_gmt":"2021-06-07T22:17:31","guid":{"rendered":"https:\/\/ecpplus.net\/weblog\/?p=3814"},"modified":"2021-06-10T16:52:33","modified_gmt":"2021-06-10T07:52:33","slug":"fix-index-read-only-on-elasticsearch","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/fix-index-read-only-on-elasticsearch\/","title":{"rendered":"Elasticsearch \u306e (FORBIDDEN\/12\/index read-only \/ allow delete (api)) \u3092\u76f4\u3059"},"content":{"rendered":"<p>Elasticsearch \u3067\u4f8b\u3048\u3070\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u906d\u9047\u3057\u305f\u5834\u5408\u3002<\/p>\n<pre><code>[403] {&quot;error&quot;:{&quot;root_cause&quot;:[{&quot;type&quot;:&quot;cluster_block_exception&quot;,&quot;reason&quot;:&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;}],&quot;type&quot;:&quot;cluster_block_exception&quot;,&quot;reason&quot;:&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;}<\/code><\/pre>\n<p>\u539f\u56e0\u3068\u3057\u3066\u306f\u3001ES\u304c\u4f7f\u7528\u3067\u304d\u308b\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u4e0a\u9650\u306b\u8feb\u3063\u3066\u308b\u5834\u5408\u304c\u591a\u3044\u3002\u307e\u305a\u306f ES \u306b\u5272\u308a\u5f53\u3066\u3089\u308c\u3066\u3044\u308b\u5bb9\u91cf\u3092\u78ba\u8a8d\u3057\u3001\u4ed6\u306e\u8981\u56e0\u3067\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u81ea\u4f53\u306b\u7a7a\u304d\u304c\u5c11\u306a\u3044\u6642\u306f\u6383\u9664\u3059\u308b\u3002<\/p>\n<p>\u305d\u306e\u4e0a\u3067\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b settings API \u3092\u53e9\u304f\u3053\u3068\u3067\u76f4\u308b\u3002<\/p>\n<pre><code class=\"language-sh\">curl -XPUT -H &quot;Content-Type: application\/json&quot; http:\/\/localhost:9200\/_all\/_settings -d &#039;{&quot;index.blocks.read_only_allow_delete&quot;: null}&#039;<\/code><\/pre>\n<a target=\"_blank\" href=\"https:\/\/stackoverflow.com\/questions\/50609417\/elasticsearch-error-cluster-block-exception-forbidden-12-index-read-only-all\" rel=\"noreferrer noopener\">Stack Overflow<\/a>\n","protected":false},"excerpt":{"rendered":"<p>Elasticsearch \u3067\u4f8b\u3048\u3070\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u306b\u906d\u9047\u3057\u305f\u5834\u5408\u3002 [403] {&quot;error&quot;:{&quot;root_cause&quot;:[{&quot;type&quot;:&quot; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3958,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[61,7,12],"class_list":["post-3814","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-elasticsearch","tag-linux","tag-mac"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/3814","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=3814"}],"version-history":[{"count":3,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/3814\/revisions"}],"predecessor-version":[{"id":4030,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/3814\/revisions\/4030"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media\/3958"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=3814"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=3814"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=3814"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}