今天es在保存数据的时候报错
org.frameworkset.elasticsearch.ElasticSearchException: {"error":{"root_cause":[{"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"}],"type":"cluster_block_exception","reason":"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"},"status":403}
1.解决办法:curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}',直接在es所在机器执行该命令即可。
2.执行后,再保存数据时会间歇性报错,再次查找原因,是磁盘满了,清理磁盘即可(参考Blog:https://www.cnblogs.com/Bruce_H21/p/9088509.html)