Skip to content

Instantly share code, notes, and snippets.

@seyuf
Last active September 4, 2019 13:54
Show Gist options
  • Save seyuf/601a6dbe4ebcdf336bc597320e183000 to your computer and use it in GitHub Desktop.
Save seyuf/601a6dbe4ebcdf336bc597320e183000 to your computer and use it in GitHub Desktop.
Elasticsearch "blocked by: [FORBIDDEN/12/index read-only / allow delete (api)" error

Override index closing when available disk space is less than 5%

curl -XPUT 'http://localhost:9200/_cluster/settings' -H "Content-Type: application/json" -d '{ "persistent" : { "cluster.routing.allocation.disk.threshold_enabled" : false } }'

Unlock from read from read-only state

curl -XPUT 'http://localhost:9200/_all/_settings' -H "Content-Type: application/json"   -d '{ "index.blocks.read_only_allow_delete": null }' 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment