AWS ElasticSearchService index_create_block_exception
Asked Answered
P

4

8

I'm trying to create a new index in AWS ElasticSearch cluster after increasing the cluster size and seeing index_create_block_exception. How can i rectify this? I tried searching but did not get exact answers. Thank you.

curl -XPUT 'http://<aws_es_endpoint>/optimus/'

{"error":{"root_cause":[{"type":"index_create_block_exception","reason":"blocked by: [FORBIDDEN/10/cluster create-index blocked (api)];"}],"type":"index_create_block_exception","reason":"blocked by: [FORBIDDEN/10/cluster create-index blocked (api)];"},"status":403}
Premium answered 22/11, 2016 at 7:52 Comment(0)
S
15

According to AWS, the above exception is being thrown due to a low memory in disks.

For t2 instances, when the JVMMemoryPressure metric exceeds 92%, Amazon ES triggers a protection mechanism by blocking all write operations to prevent the cluster from getting into red status. When the protection is on, write operations will fail with a ClusterBlockException error, new indexes cannot be created, and the IndexCreateBlockException error will be thrown.

I'm afraid the issue is still on.

Selfmortification answered 22/11, 2016 at 8:43 Comment(2)
Issue existed with the service. Now resolved by their team. Thank you for your response.Premium
same protection mechanisms happen on on c4 instances.Commonality
C
1

By the way, index creation can be unblocked using:

curl -XPUT -H "Content-Type: application/json" http://<end-point>:9200/_cluster/settings -d '{"persistent": {"cluster.blocks.create_index": false}}'

Make sure to replace <end-point> with your Elasticsearch end-point.

Caledonian answered 5/12, 2023 at 23:22 Comment(0)
G
0

You'll also get this error if you run out of disk space.

This should of course not happen after increasing the cluster size, but if you suddenly get this error it'd be worth to check that all your instances has storage left - i.e. don't look at the Total free storage space graph but at the Minimum free storage space one.

Grass answered 31/8, 2020 at 6:8 Comment(0)
H
0

The Best Solution is please do empty bin in bin folder in your system. It is nothing but storage issue so once it is freed up this error won't be occured.

Hoberthobey answered 9/8 at 5:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.