amazon-web-services - AWS Elasticsearch 。禁止/8/索引写入 (api)。无法写入索引

标签 amazon-web-services elasticsearch

我正在尝试将文档列表转储到 AWS Elasticsearch 实例。它运行良好。然后,突然间它开始抛出这个错误:

{ _index: '<my index name>',
  _type: 'type',
  _id: 'record id',
  status: 403,
  error: 
   { type: 'cluster_block_exception',
     reason: 'blocked by: [FORBIDDEN/8/index write (api)];' } }

我查看了论坛。他们中的大多数人说这是一个 JVM 内存问题。如果超过 92%,AWS 将停止对集群/索引的任何写入。但是,当我检查 JVM 内存时,它显示不到 92%。我在这里遗漏了什么?

最佳答案

此错误是 Amazon ES 服务主动阻止写入以防止集群达到红色或黄色状态。它使用 index.blocks.write 执行此操作.

两个原因是:

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.

关于amazon-web-services - AWS Elasticsearch 。禁止/8/索引写入 (api)。无法写入索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44383601/

相关文章:

python - 使用 Python 和 boto3 连接到 Cognito 时出现 NoCredentialsError

amazon-web-services - 如何让 VPC 端点在 Docker 容器中工作?

python-3.x - 如何为 Lex 机器人运行时获取 PostText API 调用的授权用户

elasticsearch - Elasticsearch集群上的路由是自动的吗?

elasticsearch - 弹性搜寻查询(a如x和y)或(b如x和y)

java - AWS Java Lambda 局部变量与对象变量

amazon-web-services - 如何使用 Terraform 加密 S3 存储桶

java - Elasticsearch - 分配分片

elasticsearch - 方面搜索与RDMS上的字段相比

elasticsearch - 错误:必须在elasticsearch.yml中配置smtp.host