{"record":{"id":"3c86200e1202d83c","repo":"nats-io/nats-server","slug":"request-from-follower-for-entry-at-index-d-erro","errorCode":null,"errorMessage":"Request from follower for entry at index [%d] errored for state %+v - %v","messagePattern":"Request from follower for entry at index \\[(.+?)\\] errored for state %\\+v - (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":3794,"sourceCode":"\t\t\tn.Unlock()\n\t\t\tarPool.Put(ar)\n\t\t\treturn\n\t\t} else {\n\t\t\tstart = lastIndex + 1\n\t\t\t// If no other entries, we can just return here.\n\t\t\tif state.Msgs == 0 || start > state.LastSeq {\n\t\t\t\tn.debug(\"Finished catching up\")\n\t\t\t\tn.Unlock()\n\t\t\t\tarPool.Put(ar)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tn.debug(\"Snapshot sent, reset first catchup entry to %d\", lastIndex)\n\t\t}\n\t}\n\n\tae, err := n.loadEntry(start)\n\tif err != nil {\n\t\tn.warn(\"Request from follower for entry at index [%d] errored for state %+v - %v\", start, state, err)\n\t\tif err == ErrStoreEOF {\n\t\t\t// If we are here we are seeing a request for an item beyond our state, meaning we should stepdown.\n\t\t\tn.stepdownLocked(noLeader)\n\t\t\tn.Unlock()\n\t\t\tarPool.Put(ar)\n\t\t\treturn\n\t\t}\n\t\tae, err = n.loadFirstEntry()\n\t}\n\tif err != nil || ae == nil {\n\t\tn.warn(\"Could not find a starting entry for catchup request: %v\", err)\n\t\t// If we are here we are seeing a request for an item we do not have, meaning we should stepdown.\n\t\t// This is possible on a reset of our WAL but the other side has a snapshot already.\n\t\t// If we do not stepdown this can cycle.\n\t\tn.stepdownLocked(noLeader)\n\t\tn.Unlock()\n\t\tarPool.Put(ar)\n\t\treturn","sourceCodeStart":3776,"sourceCodeEnd":3812,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L3776-L3812","documentation":"A follower's catchup request asked for an entry at 'start' but the leader's loadEntry failed. If the error is ErrStoreEOF the leader steps down (it no longer has the requested history, meaning its state is behind what it thought); other errors are logged and the request is dropped so the follower retries or falls back to snapshot.","triggerScenarios":"Thrown at server/raft.go:3794 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["For EOF: let the stepdown proceed; a better-equipped leader will send a snapshot","For other errors: check the leader's WAL store health","Follower-side retry will re-request catchup automatically"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3a66a489d262bf89b71a71c955c94920394532f3","analyzedAt":"2026-09-02T04:41:54.247Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}