系统重启后,Eleastisearch6.5.0在给 Eleastisearch 更新索引的时候报了一个错误:
ClusterBlockException[blocked by: [FORBIDDEN/hxl_test/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
}
解决办法:
1.查看当前设置
curl -XGET http://192.168.1.136:19200/_all/_settings?pretty
找到index.blocks.read_only_allow_delete项
发现该项的值为true
2.修改该项的值
curl -XPUT -H "Content-Type: application/json" http://192.168.1.136:19200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'