{"record":{"id":"038b4b03b562f944","repo":"nats-io/nats-server","slug":"error-subscribing-to-forwarded-proposals-v","errorCode":null,"errorMessage":"Error subscribing to forwarded proposals: %v","messagePattern":"Error subscribing to forwarded proposals: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":3426,"sourceCode":"\t\t\tn.tryCommit(n.pindex)\n\t\t\treturn true\n\t\t}\n\t}\n\treturn true\n}\n\nfunc (n *raft) runAsLeader() {\n\tif n.State() == Closed {\n\t\treturn\n\t}\n\n\tn.Lock()\n\tpsubj, rpsubj, term := n.psubj, n.rpsubj, n.term\n\n\t// For forwarded proposals, both normal and remove peer proposals.\n\tfsub, err := n.subscribe(psubj, n.handleForwardedProposal)\n\tif err != nil {\n\t\tn.warn(\"Error subscribing to forwarded proposals: %v\", err)\n\t\tn.stepdownLocked(noLeader)\n\t\tn.Unlock()\n\t\treturn\n\t}\n\trpsub, err := n.subscribe(rpsubj, n.handleForwardedRemovePeerProposal)\n\tif err != nil {\n\t\tn.warn(\"Error subscribing to forwarded remove peer proposals: %v\", err)\n\t\tn.unsubscribe(fsub)\n\t\tn.stepdownLocked(noLeader)\n\t\tn.Unlock()\n\t\treturn\n\t}\n\n\t// Cleanup our subscription when we leave.\n\tdefer func() {\n\t\tn.Lock()\n\t\tn.unsubscribe(fsub)\n\t\tn.unsubscribe(rpsub)","sourceCodeStart":3408,"sourceCodeEnd":3444,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L3408-L3444","documentation":"The leader failed to create its internal subscription on the proposals subject (psubj) at the start of runAsLeader. Without it, forwarded proposals from followers cannot be received, so the node steps down (noLeader) instead of running an incomplete leader.","triggerScenarios":"Thrown at server/raft.go:3426 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the underlying NATS subsystem error (max subscriptions, memory limits, shutdown in progress)","Verify system/memory limits are not exhausted on the server","The node will retry leadership via a new election once conditions clear; no manual action needed for transient errors"],"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-08T10:18:20.063Z"}