异常
Caused by: org.elasticsearch.ElasticsearchStatusException: Elasticsearch exception [type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];] at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:177)
原因
集群存储资源高水位异常,默认当磁盘空间大于95%时,就会禁止写入。
解决
- 首先让es节点腾出足够的空间、
删除磁盘数据 ; 扩容。 - 执行恢复命令
PUT _settings { "index": { "blocks": { "read_only_allow_delete": "false" } } }
让es恢复到可写入状态。问题解决!