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}
gvasquez
  • 1,919
  • 5
  • 27
  • 41
Abhishek Agarwal
  • 846
  • 4
  • 13
  • 34

2 Answers2

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.

Kulasangar
  • 9,046
  • 5
  • 51
  • 82
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.

Raniz
  • 10,882
  • 1
  • 32
  • 64