{"id":1672,"date":"2023-03-25T22:25:11","date_gmt":"2023-03-25T14:25:11","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=1672"},"modified":"2023-03-25T22:25:11","modified_gmt":"2023-03-25T14:25:11","slug":"logstash-outputs-elasticsearch-retrying-failed-action-with-response-code-403","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/03\/25\/logstash-outputs-elasticsearch-retrying-failed-action-with-response-code-403\/","title":{"rendered":"logstash.outputs.elasticsearch retrying failed action with response code 403"},"content":{"rendered":"<p>\u5728\u7528Logstash\u6536\u96c6\u5e94\u7528\u6570\u636e\u5230ElasticSearch\u4e2d\u65f6\uff0c\u8fd0\u884c\u4e00\u6bb5\u65f6\u95f4\u540e\u5c31\u51fa\u9519\uff1a<\/p>\n<pre><code class=\"language-bash\">[root@appblog.cn logstash]# tail -f logs\/logstash-plain.log \n[2021-02-20T17:09:26,878][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,878][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,879][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,879][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,879][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,880][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,880][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,880][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})\n[2021-02-20T17:09:26,881][INFO ][logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({&quot;type&quot;=&gt;&quot;cluster_block_exception&quot;, &quot;reason&quot;=&gt;&quot;blocked by: [FORBIDDEN\/12\/index read-only \/ allow delete (api)];&quot;})<\/code><\/pre>\n<p><!-- more --><\/p>\n<p>\u6309\u7167 Eleastisearch \u5b98\u65b9\u6587\u6863\u7ed9\u7684\u89e3\u51b3\u529e\u6cd5\u662f<\/p>\n<p>An example of resetting the read-only index block on the twitter index:<\/p>\n<pre><code class=\"language-json\">PUT \/twitter\/_settings\n{\n  &quot;index.blocks.read_only_allow_delete&quot;: null\n}<\/code><\/pre>\n<p>\u5b98\u65b9\u94fe\u63a5\uff1a <a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/disk-allocator.html\">https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/disk-allocator.html<\/a><\/p>\n<p>\u6309\u7167\u5b98\u65b9\u7ed9\u7684\u8fd9\u4e2a\u89e3\u51b3\u601d\u8def\uff0c\u5728Linux\u4e0a\u6267\u884c\uff1a<\/p>\n<pre><code class=\"language-bash\">curl -XPUT -H &#039;Content-Type: application\/json&#039; http:\/\/192.168.1.8:9200\/_all\/_settings -d &#039;{&quot;index.blocks.read_only_allow_delete&quot;: null}&#039;<\/code><\/pre>\n<p>\u5176\u4e2d<code>_all<\/code>\u53ef\u4ee5\u66f4\u6539\u4e3a\u81ea\u5df1\u5728\u521b\u5efa ElasticSearch \u7d22\u5f15\u7684\u65f6\u5019\u7684name\uff0c\u7528\u6765\u4fee\u6539\u5355\u4e2a\u7d22\u5f15\u53ea\u8bfb\u72b6\u6001\uff0c\u5f53\u7136\u7528<code>_all<\/code>\u662f\u4fee\u6539\u6240\u6709\u7684\u7d22\u5f15\u53ea\u8bfb\u72b6\u6001<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u7528Logstash\u6536\u96c6\u5e94\u7528\u6570\u636e\u5230ElasticSearch\u4e2d\u65f6\uff0c\u8fd0\u884c\u4e00\u6bb5\u65f6\u95f4\u540e\u5c31\u51fa\u9519\uff1a [root@appb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[345],"tags":[180,343],"class_list":["post-1672","post","type-post","status-publish","format-standard","hentry","category-elk","tag-elasticsearch","tag-logstash"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1672"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/1672\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1672"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1672"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}