Skip to content

Instantly share code, notes, and snippets.

@hkulekci
Last active October 5, 2023 20:08
Show Gist options
  • Save hkulekci/686ab6a9d2583faf3ce6b8c528ea300f to your computer and use it in GitHub Desktop.
Save hkulekci/686ab6a9d2583faf3ce6b8c528ea300f to your computer and use it in GitHub Desktop.
Elasticsearch "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)" error

If u are getting below error while indexing:

{
  "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 can be caused by disk space:

PUT index-name/_settings
{
  "index": {
    "blocks": {
      "read_only_allow_delete": "false"
    }
  }
}
@lc-thomas
Copy link

Love you man

@hkulekci
Copy link
Author

hkulekci commented Jun 16, 2019

haha, me too. 😃

@vshuraeff
Copy link

yeah

@mehmetkurt
Copy link

lovely, thanks... 👍

@sivakumar05
Copy link

In which file, I need to keep below lines.

PUT index-name/_settings
{
"index": {
"blocks": {
"read_only_allow_delete": "false"
}
}
}

@hkulekci
Copy link
Author

You need to execute this request in "Dev Tools" on Kibana.

@sivakumar05
Copy link

It worked. Thanks for your suggestion.

@hkulekci
Copy link
Author

It was a pleasure to see you here. 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment