ElasticSearch ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
elasticsearch使用中报了错误:
- ElasticSearch ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];
- 返回错误403;
解决办法:
1.按照官方给的解决思路,在 Eleastisearch 的机器上执行:
curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
2.磁盘空间可能不足,清理磁盘后重启kibana。
Eleastisearch6.0.0 今天在给 Eleastisearch 更新索引的时候报了一个错误:
ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]
按照 Eleastisearch 官方文档给的解决办法是
An example of resetting the read-only index block on the twitter index:
PUT /twitter/_settings
{
“index.blocks.read_only_allow_delete”: null
}
官方的链接是 : 点击这里查看
按照官方给的这个解决思路,真正在linux 上面执行的时候,请看:
curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
其中 _all 这个可以更改为自己在创建 Eleastisearch 索引的时候的name,用来修改单个索引只读状态,当然用 _all 也可以, _all 是修改了所有的索引只读状态