{"record":{"id":"98c23145cad397aa","repo":"nats-io/nats-server","slug":"error-subscribing-to-forwarded-remove-peer-proposa","errorCode":null,"errorMessage":"Error subscribing to forwarded remove peer proposals: %v","messagePattern":"Error subscribing to forwarded remove peer proposals: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/raft.go","lineNumber":3433,"sourceCode":"func (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)\n\t\tn.Unlock()\n\t}()\n\tn.Unlock()\n\n\thb := time.NewTicker(hbInterval)\n\tdefer hb.Stop()\n","sourceCodeStart":3415,"sourceCodeEnd":3451,"githubUrl":"https://github.com/nats-io/nats-server/blob/3a66a489d262bf89b71a71c955c94920394532f3/server/raft.go#L3415-L3451","documentation":"The leader failed to subscribe to the remove-peer proposals subject (rpsubj) after successfully subscribing to normal proposals. It unsubscribes the first subscription and steps down, since it cannot serve both proposal kinds.","triggerScenarios":"Thrown at server/raft.go:3433 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check subscription/resource limits on the internal account","Restart or let a new election occur once the subscription failure cause is resolved","Monitor for repeated stepdowns which indicate a systemic subscription problem"],"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"}