当前位置: 代码迷 >> 综合 >> Elasticsearch exception [ reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)
  详细解决方案

Elasticsearch exception [ reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)

热度:91   发布时间:2023-09-20 00:32:16.0

Elasticsearch exception [ reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)
可能是 应该是你的磁盘快满了

解决方式

PUT _settings
    {
    "index": {
    "blocks": {
    "read_only_allow_delete": "false"
    }
    }
    }

df -hl /usr/local 查看es安装磁盘所在的目录

Elasticsearch exception [ reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)

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

ElasticsearchStatusException[Elasticsearch exception [type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]]
 Suppressed: org.elasticsearch.client.ResponseException: method [PUT], host [http://localhost:9200], URI [/checkrule/checkrule/c1f6be10d4894917908d7245d3a16bb5?timeout=2m], status line [HTTP/1.1 403 Forbidden]
{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}],"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"},"status":403}
                at org.elasticsearch.client.RestClient$1.completed(RestClient.java:357)
                ... 17 more

 

  相关解决方案