{"record":{"id":"4a58f6b6da62568e","repo":"nats-io/nats-server","slug":"could-not-find-a-starting-entry-for-catchup-reques","errorCode":null,"errorMessage":"Could not find a starting entry for catchup request: %v","messagePattern":"Could not find a starting entry for catchup request: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":3805,"sourceCode":"\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\n\t}\n\tif ae.pindex != ar.index || ae.pterm != ar.term {\n\t\tn.debug(\"Our first entry [%d:%d] does not match request from follower [%d:%d]\", ae.pterm, ae.pindex, ar.term, ar.index)\n\t}\n\t// Create a queue for delivering updates from responses.\n\tindexUpdates := newIPQueue[uint64](n.s, fmt.Sprintf(\"[ACC:%s] RAFT '%s' indexUpdates\", n.accName, n.group))\n\tindexUpdates.push(ae.pindex)\n\tn.progress[ar.peer] = indexUpdates\n\tn.wg.Add(1)\n\tn.Unlock()\n\tstarted := n.s.startGoRoutine(func() {","sourceCodeStart":3787,"sourceCodeEnd":3823,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L3787-L3823","documentation":"After the direct loadEntry(start) failed and a loadFirstEntry() fallback was attempted, the leader still could not obtain any starting entry for the catchup request — the log is empty, closed, or unreadable. Catchup cannot proceed from the log.","triggerScenarios":"Thrown at server/raft.go:3805 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the leader actually has entries or a snapshot to serve","Check the WAL store for corruption or truncation","The follower will be served by a snapshot from a node with sufficient state"],"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"}