AWS弹性搜索. FORBIDDEN/8/index写入(api).无法写入索引 [英] AWS elastic-search. FORBIDDEN/8/index write (api). Unable to write to index
问题描述
我正在尝试将文档列表转储到AWS弹性搜索实例.运行良好.然后,突然间它开始抛出此错误:
I am trying dump a list of docs to an AWS elastic-search instance. It was running fine. Then, all of sudden it started throwing this error:
{ _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%.我在这里想念什么吗?
I checked in forums. Most of them says that it is a JVM memory issue. If it is going more than 92%, AWS will stop any writes to the cluster/index. However, when I checked the JVM memory, it shows less than 92%. I am missing something here?
谢谢.
推荐答案
此错误是Amazon ES服务主动阻止写操作,以防止群集达到红色或黄色状态.它使用 index.blocks.write
.
This error is the Amazon ES service actively blocking writes to protect the cluster from reaching red or yellow status. It does this using index.blocks.write
.
两个原因是:
Low Memory
当JVMMemoryPressure指标在30分钟内超过92%时,Amazon ES会触发保护机制并阻止所有写入操作,以防止集群达到红色状态.启用保护后,写入操作将失败,并出现ClusterBlockException错误,无法创建新索引,并抛出IndexCreateBlockException错误.
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.
当JVMMemoryPressure指标在五分钟内恢复到88%或更低时,该保护将被禁用,并且对集群的写操作将被阻止.
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具有默认的低水印";为85%,这意味着一旦磁盘使用率超过85%,Elasticsearch将不再为该节点分配碎片. Elasticsearch还具有默认的高水印"标记.占90%,这时它将尝试将碎片重新定位到其他节点.
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.
这篇关于AWS弹性搜索. FORBIDDEN/8/index写入(api).无法写入索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!