es插入数据报错
2020-04-21 13:11:15.757 |-ERROR [http-nio-8001-exec-4] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] [175] -| Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is ClusterBlockException[blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];]] with root cause
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [FORBIDDEN/12/index 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}'