【cluster_block_exception】写操作elasticsearch索引报错

这篇具有很好参考价值的文章主要介绍了【cluster_block_exception】写操作elasticsearch索引报错。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

背景

今天线上elk的数据太多,服务器的空间不足了。所以打算删除一些没用用的数据。我是用下面的request:

POST /{index_name}/_delete_by_query?wait_for_completion=false
{
  "query": {
    "bool": {
      "must": {
        "match": {
          "loglevel": "DEBUG"
        }
      }
    }
  }
}

但是出错了。
{ _index: ‘’,
_type: ‘type’,
_id: ‘record id’,
status: 403,
error:
{ type: ‘cluster_block_exception’,
reason: ‘blocked by: [FORBIDDEN/8/index write (api)];’ } }
【cluster_block_exception】写操作elasticsearch索引报错,elasticsearch,elasticsearch,jenkins,大数据

导致原因:

(都是比较简单的英文,我就直接粘贴过来了):
相关帖子

from reaching red or yellow status. It does this using index.blocks.write.

The two reasons being:

Low Memory

When the JVMMemoryPressure metric exceeds 92% for 30 minutes, Amazon ES triggers a protection mechanism and blocks all write operations to prevent the cluster from reaching red status. When the protection is on, write operations fail with a ClusterBlockException error, new indexes can’t be created, and the IndexCreateBlockException error is thrown.

When the JVMMemoryPressure metric returns to 88% or lower for five minutes, the protection is disabled, and write operations to the cluster are unblocked.

Low Disk Space

Elasticsearch has a default “low watermark” of 85%, meaning that once disk usage exceeds 85%, Elasticsearch no longer allocates shards to that node. Elasticsearch also has a default “high watermark” of 90%, at which point it attempts to relocate shards to other nodes.

官网对index.blocks.write参数的描述:

https://www.elastic.co/guide/en/elasticsearch/reference/6.0/index-modules.html#dynamic-index-settings

解决方法:

https://sease.io/2022/06/elasticsearch-disk-space-issue-and-rollover-solution.html
disale index.blocks.write.

PUT /[_all|<your_index_name>]/_settings
{
  "index.blocks.write": null
}

然后再重试之前的删除请求。文章来源地址https://www.toymoban.com/news/detail-648931.html

到了这里,关于【cluster_block_exception】写操作elasticsearch索引报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • logstash向es同步数据报错:retrying failed action with response code: 403 ({“type“=>“cluster_block_exce

    使用logstash向es同步数据报错: [logstash.outputs.elasticsearch] retrying failed action with response code: 403 ({\\\"type\\\"=\\\"cluster_block_exception\\\", \\\"reason\\\"=\\\"blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];\\\"}) 服务器磁盘空间满了导致es索引为只读状态。 1、清理磁盘,空出更大磁盘空间或直接扩充磁盘空

    2024年02月16日
    浏览(24)
  • elasticsearch 查看所有集群设置_cluster/settings

    样例数据

    2024年02月14日
    浏览(32)
  • Elasticsearch:跨集群复制应用场景及实操 - Cross Cluster Replication

    通过跨集群复制(Cross Cluster Replication - CCR),你可以跨集群将索引复制并实现: 在数据中心中断时继续处理搜索请求 防止搜索量影响索引吞吐量 通过在距用户较近的地理位置处理搜索请求来减少搜索延迟 跨集群复制采用主动 - 被动模型。 你索引到领导者(leader)索引,并

    2024年02月07日
    浏览(30)
  • 分布式存储系统举例剖析(elasticsearch,kafka,redis-cluster)

    1. 概述 对于分布式系统,人们首先对现实中的分布式系统进行高层抽象,然后做出各种假设,发展了诸如CAP, FLP 等理论,提出了很多一致性模型,Paxos 是其中最璀璨的明珠。我们对分布式系统的时序,复制模式,一致性等基础理论特别关注。 在共识算法的基础上衍生了选举

    2024年02月12日
    浏览(32)
  • elasticsearch No alive nodes found in your cluster 解决

    首先检一下host及端口是否正确,网络通不通。 其次想一下你的代码有没有bulk这类批量发送数据的操作,如果发送的数据超过默认的100MB,也会报这个错,我就中招了。解决办法就是把http.max_content_length这个参数调大即可。 我是docker安装的es,因此我们把这个elasticsearch.yaml配置

    2024年02月12日
    浏览(32)
  • elasticsearch 7.12.1报错处理:ElasticsearchStatusException[Elasticsearch exception [type=parse_exception]

    提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 最近在使用RestHighLevelClient测试后端数据时,遇到如下一个报错: 问题出在我没有给 geoDistanceQuery 设置中心坐标 设置中心坐标后问题得到解决。 以下是elastic客户端查询索引的代码

    2024年02月16日
    浏览(30)
  • E往无前 | 腾讯云大数据 ElasticSearch 高级功能:Cross Cluster Replication实战

    前言 Elasticsearch在platinum版本中,推出了Cross Cluster Replication特性(以下简称CCR),也即跨集群远程复制。 该特性可以解决两类问题: 1,数据迁移; 2,异地备份。 本文以实战为主,基本概念及原理可参考官网文档。 https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-ccr.h

    2024年02月12日
    浏览(52)
  • Elasticsearch:跨集群复制应用场景及实操 - Cross Cluster Replication 为集群之间建立互信

    通过跨集群复制(Cross Cluster Replication - CCR),你可以跨集群将索引复制并实现: 在数据中心中断时继续处理搜索请求 防止搜索量影响索引吞吐量 通过在距用户较近的地理位置处理搜索请求来减少搜索延迟 跨集群复制采用主动 - 被动模型。 你索引到领导者(leader)索引,并

    2024年02月11日
    浏览(46)
  • ES内存问题 Elasticsearch exception type=circuit_breaking_exception,

    Elasticsearch exception [type=circuit_breaking_exception, reason=[parent] Data too large, data for [http_request] would be [986856200/941.1mb], which is larger than the limit of [986061209/940.3mb], real usage: [986855776/941.1mb], new bytes reserved: [424/424b], usages [request=0/0b, fielddata=2884/2.8kb, in_flight_requests=424/424b, model_inference=0/0b, a

    2023年04月08日
    浏览(40)
  • Elasticsearch8.6启动异常:fatal exception while booting Elasticsearch

    fatal exception while booting Elasticsearch java.nio.file.InvalidPathException: Trailing char at index 48: C:Program FilesJavajdk1.8.0_181libtools.jar at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:191) ~[?:?] at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[?:?] at sun.nio.fs.WindowsPathParser.parse(WindowsPathParse

    2024年02月04日
    浏览(30)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包