2017-06-06 195 views
3

我试图将文档列表转储到AWS弹性搜索实例。它运行良好。然后,所有的突然它开始抛出错误AWS弹性搜索。 FORBIDDEN/8/index写入(api)。无法写入索引

{_index: '', _type: '类型', _id: '记录ID', 状态:403, 错误: {类型: 'cluster_block_exception', reason:'blocked by:[FORBIDDEN/8/index write(api)];'' }}

我检查了论坛。他们中的大多数都表示这是JVM内存问题。如果它超过92%,AWS将停止对群集/索引的任何写入。但是,当我检查JVM内存时,它显示少于92%。我在这里错过了什么?

谢谢,

回答

0

好的。现在它在〜24小时后开始工作。我不确定发生了什么事。为什么需要这么多时间? AWS应该提供关于他们给客户的错误文本的更多信息。

+0

你可能有一些东西,清除计划的基础上指标(例如任何更多的“N '天老,每天) - 因此它可能开始工作因为集群低于限制。 –

4

此错误表明AWS ElasticSearch根据磁盘空间在您的域上放置了一个块。在85%时,ES不会允许您创建任何新的索引。在90%的情况下,不能编写新文档。

3

此错误是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.