# ElasticSearch6 报错FORBIDDEN12index read-only allow delete (api)
官方解决方法:
curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
_all 可以改为自己的索引名称,也可以直接执行
curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
实践成功方案:
curl -XPUT -H "Content-Type: application/json" http://192.168.0.23:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": "false"}'