es 同步索引报错:ElasticSearch ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]
es 同步索引报错:ElasticSearch ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]
原因:
网上有的解决方式是方法一,我试过,没有生效使用的是方法二
方法一
curl -XPUT -H "Content-Type: application/json" https://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
方法二
使用kibana的控制台,输入以下代码
PUT _settings
{
"index":{
"blocks":{
"read_only_allow_delete":"false"
}
}
}