解决Elasticsearch的[FORBIDDEN/12/index read-only / allow delete (api)];]问题

时间:2024-05-20 18:57:43

Error:

ElasticsearchException[Elasticsearch exception [type=cluster_block_exception, reason=blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]]

 

出错原因:内存不足,ElasticSearch进入“只读”模式,节点无法更改。

 

解决方法:使用Postman软件,运行以下URL,取消节点的只读模式。

PUT         http://127.0.0.1:9200/_all/_settings

Headers:   KEY = Content-Type, VALUE = application/json

Body: 

{
  "index.blocks.read_only_allow_delete": null
}

解决Elasticsearch的[FORBIDDEN/12/index read-only / allow delete (api)];]问题

解决Elasticsearch的[FORBIDDEN/12/index read-only / allow delete (api)];]问题