How do I resolve the 403 "index_create_block_exception" or "cluster_block_exception" error in OpenSearch Service?

2 minute read
0

I tried to create an index or write data to my Amazon OpenSearch Service domain, but I received a "index_create_block_exception" or "cluster_block_exception" error.

Resolution

Follow these troubleshooting steps for the type of ClusterBlockException error message that you received.

index_create_block_exception

{
     "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
}

This error occurs because of a lack of storage space. To troubleshoot storage issues, see Lack of available storage space. This error also ocurrs because of a high JVM memory pressure. To troubleshoot high JVM memory pressure issues, see How do I troubleshoot high JVM memory pressure on my Amazon OpenSearch Service cluster?

cluster_block_exception (cluster in read-only state)

{
  "error" : {
    "root_cause" : [
      {
        "type" : "cluster_block_exception",
        "reason" : "blocked by: [FORBIDDEN/6/cluster read-only (api)];",
      }
    ],
    "type" : "cluster_block_exception",
    "reason" : "blocked by: [FORBIDDEN/6/cluster read-only (api)];",
  },
  "status" : 403
}

This error occurs when the read-only block is set to true. If quorum loss occurs and your cluster has more than one node, then OpenSearch restores quorum and places the cluster into a read-only state. You can use GET _cluster/settings to verify if the read-only state is set to true.

For more information, see Cluster in read-only state.

cluster_block_exception (warm indexes)

{
 "error": {
   "root_cause": [{
      "type": "cluster_block_exception",
      "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
    }],
    "type": "cluster_block_exception",
    "reason": "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)];"
  },
  "status": 403
}

This error occurs when you try to add, update, or delete individual documents in the warm indices. Warm indices are read-only unless you return them to hot storage. You can query the indices and delete them only if they're present in the UltraWarm storage. To update documents, you must migrate the index from UltraWarm storage to hot storage.

For more information, see Returning warm indexes to hot storage.

Related information

How can I scale up or scale out an Amazon OpenSearch Service domain?

AWS OFFICIAL
AWS OFFICIALUpdated a year ago