elasticsearch cluster_error ai_generated true

ClusterBlockException: blocked by: [FORBIDDEN/9/index read-only / allow delete (api)]; [FORBIDDEN/13/cluster read-only / allow delete (api)]

ID: elasticsearch/cluster-block-exception

Also available as: JSON · Markdown
88%Fix Rate
88%Confidence
3Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
8 active

Root Cause

Cluster-level write block active. Triggered by disk watermarks, manual settings, or metadata write block during upgrades.

generic

Workarounds

  1. 95% success Clear the cluster read-only block via settings API
    PUT _cluster/settings { 'persistent': { 'cluster.blocks.read_only_allow_delete': null, 'cluster.blocks.read_only': null } }

    Sources: https://www.elastic.co/guide/en/elasticsearch/reference/current/

  2. 90% success Free disk space to clear auto-applied flood watermark blocks
    Check: GET _cat/allocation?v  # then delete old indices or add disk
  3. 82% success Check if upgrade or snapshot operation set a temporary metadata block
    GET _cluster/settings?include_defaults=true  # look for cluster.blocks.* settings

Dead Ends

Common approaches that don't work:

  1. Force delete indices to free space while blocks are active 72% fail

    Read-only-allow-delete blocks permit deletion, but cluster-level blocks may prevent even that. Clear the block first.

  2. Restart nodes to clear the block 80% fail

    Blocks set via persistent settings survive restarts. The block must be cleared via the cluster settings API.