nats-io/nats-server · error
Error storing entry to WAL: %v
Error message
Error storing entry to WAL: %v
What it means
storeToWAL returned an error other than ErrStoreClosed while an append-entry follower was persisting a received entry. The write error was already recorded via setWriteErrLocked (which may shut the store down); the log surfaces it at the replication path.
Source
Thrown at server/raft.go:4819
// Setup our state for catching up.
n.debug("AppendEntry did not match [%d:%d] with [%d:%d]", ae.pterm, ae.pindex, n.pterm, n.pindex)
inbox := n.createCatchup(ae)
ar := newAppendEntryResponse(n.pterm, n.pindex, n.id, false)
n.Unlock()
n.sendRPC(ae.reply, inbox, ar.encode(arbuf))
arPool.Put(ar)
return
}
CONTINUE:
// Save to our WAL if we have entries.
if ae.shouldStore() {
// Only store if an original which will have sub != nil
if sub != nil {
if err := n.storeToWAL(ae); err != nil {
if err != ErrStoreClosed {
n.warn("Error storing entry to WAL: %v", err)
}
n.Unlock()
return
}
n.cachePendingEntry(ae)
n.resetInitializing()
} else {
// This is a replay on startup so just take the appendEntry version.
n.pterm = ae.term
n.pindex = ae.pindex + 1
}
}
// Check to see if we have any related entries to process here.
for _, e := range ae.entries {
switch e.Type {
case EntryLeaderTransfer:
// Only process these if they are new, so no replays or catchups.View on GitHub (pinned to 3a66a489d2)
Solutions
- Inspect the recorded write error (disk full, I/O failure) on this node
- Free disk space or repair storage, then restart to rejoin via catchup/snapshot
- Monitor werr-driven shutdowns to catch failing disks early
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at server/raft.go:4819 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nats-io/nats-server@3a66a489d2 (2026-09-02).
Data as JSON: /api/errors/fbf53a6d144be9c4.
Report an issue: GitHub.