Filebeat Error: 'index_closed_exception' — Cause, Fix, and Troubleshooting Guide
Fix Filebeat 'index_closed_exception closed': reopen the target index or fix ILM/rollover so bulk writes stop hitting a closed Elasticsearch index.
- #filebeat
- #logging
- #troubleshooting
- #errors
Stuck on this Filebeat error? Get the free incident triage checklist
A one-page PDF — the exact steps to isolate, fix, and verify a production error like this one. No spam, unsubscribe anytime.
What this error means
A closed Elasticsearch index has its shards released from memory and rejects reads and writes. If Filebeat tries to bulk-write to an index that has been closed, ES rejects the items:
Failed to perform any bulk index operations: 403 Forbidden: {"error":{"type":"index_closed_exception","reason":"closed","index":"filebeat-8.13.0-2026.07.12"}}
Indices get closed to save heap on old data, by an ILM/curator action, or by an operator command. When Filebeat’s write alias or target resolves to a closed index, ingestion for that index stops. The events are retried, not dropped, but they cannot land until the index is reopened or the write target points at an open (usually the current rollover) index.
How the agent reports it
index_closed_exceptionwith"reason":"closed"on bulk writes.- Only writes to a specific date/rollover index fail; newer indices may be fine.
_cat/indicesshows the target index inclosestatus.- Follows a curator run, an ILM misconfiguration, or a manual
_close.
Checking the agent configuration
Find the closed index and confirm what Filebeat writes to:
curl -sk 'https://es01:9200/_cat/indices/filebeat-*?v&h=index,status,health' \
-u elastic:$ES_PASS
curl -sk 'https://es01:9200/_alias/filebeat-*?pretty' -u elastic:$ES_PASS
Check the ILM state of the data stream/alias:
curl -sk 'https://es01:9200/filebeat-*/_ilm/explain?pretty' -u elastic:$ES_PASS | \
grep -i 'phase\|action\|step'
Agent configuration causes
- Index manually closed to reclaim heap.
- Curator / automation closing indices by age while still the write target.
- Write alias points at a closed index instead of the current write index.
- ILM rollover misconfigured, leaving Filebeat writing to a closed backing index.
- Restored-but-not-opened snapshot index.
Step-by-step resolution
Reopen the closed index so queued writes can land:
curl -sk -XPOST 'https://es01:9200/filebeat-8.13.0-2026.07.12/_open' \
-u elastic:$ES_PASS
Fix the automation so the current write index is never closed — exclude the write index from curator/ILM close actions, and use ILM rollover so writes always go to a fresh open index:
# Confirm the write alias resolves to an OPEN index
curl -sk 'https://es01:9200/_cat/aliases/filebeat-*?v' -u elastic:$ES_PASS
If you rely on ILM, ensure the policy’s hot phase uses rollover and only closes in a later phase after the alias has moved on. Restart is not required; Filebeat flushes queued events once the index is open.
Safer agent defaults
- Never close the current write index — only closed old indices are safe.
- Events are retried, not lost, so reopening recovers the backlog.
- A stale write alias pointing at a closed index is a common ILM misconfiguration.
- Restoring a snapshot leaves indices open by default, but a
closeaction may re-close them.
Related agent errors
- Filebeat Error: ‘cluster_block_exception … index read-only / allow delete (api)’
- Filebeat Error Guide: ‘ILM policy not found’
- Filebeat Error Guide: ‘503 Service Unavailable’
Fixed it? Get 500 Filebeat & DevOps AI prompts — free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.
Did this fix your issue?
Trending errors this week
The error guides other engineers are actually reading right now.
- 1mount: wrong fs type, bad option, bad superblock
- 2Docker 'failed to set up container networking': Fix the Bridge and IP Pool
- 3Docker 'failed to create shim task': How to Fix the containerd Runtime Error
- 4modprobe: FATAL: Module not found
- 5mount: wrong fs type, bad option, bad superblock
- 6Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Get 500 Battle-Tested DevOps AI Prompts — Free
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.