Caused by: com.github.vanroy.springdata.jest.exception.JestElasticsearchException: Cannot execute jest action , response code : 403 , 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)];"} , message : null
at com.github.vanroy.springdata.jest.mapper.DefaultErrorMapper.mapError(DefaultErrorMapper.java:30)
at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.execute(JestElasticsearchTemplate.java:1211)
at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.executeWithAcknowledge(JestElasticsearchTemplate.java:1220)
at com.github.vanroy.springdata.jest.JestElasticsearchTemplate.putMapping(JestElasticsearchTemplate.java:232)
... 70 common frames omitted
错误日志如上,导致报错的原因是 索引变为只读,因为磁盘上没有更多空间。如果您使用了 95% 的磁盘空间。es 服务器将每 30 秒将所有索引变为只读模式。如果没有剩余空间,则需要释放足够的空间或按照指南所述更改 es 配置。
解决思路
1.清理或者扩展磁盘空间文章来源:https://www.toymoban.com/news/detail-502223.html
2.es服务器执行文章来源地址https://www.toymoban.com/news/detail-502223.html
curl -X PUT "localhost:9200/_all/_settings" -H 'Content-Type: application/json' -d '{"index.blocks.read_only_allow_delete": null}'
到了这里,关于ES 报错 403 cluster_block_exception....的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!