nats-io/nats-server · error
Error subscribing to forwarded remove peer proposals: %v
Error message
Error subscribing to forwarded remove peer proposals: %v
What it means
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.
Source
Thrown at server/raft.go:3433
func (n *raft) runAsLeader() {
if n.State() == Closed {
return
}
n.Lock()
psubj, rpsubj, term := n.psubj, n.rpsubj, n.term
// For forwarded proposals, both normal and remove peer proposals.
fsub, err := n.subscribe(psubj, n.handleForwardedProposal)
if err != nil {
n.warn("Error subscribing to forwarded proposals: %v", err)
n.stepdownLocked(noLeader)
n.Unlock()
return
}
rpsub, err := n.subscribe(rpsubj, n.handleForwardedRemovePeerProposal)
if err != nil {
n.warn("Error subscribing to forwarded remove peer proposals: %v", err)
n.unsubscribe(fsub)
n.stepdownLocked(noLeader)
n.Unlock()
return
}
// Cleanup our subscription when we leave.
defer func() {
n.Lock()
n.unsubscribe(fsub)
n.unsubscribe(rpsub)
n.Unlock()
}()
n.Unlock()
hb := time.NewTicker(hbInterval)
defer hb.Stop()
View on GitHub (pinned to 3a66a489d2)
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at server/raft.go:3433 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/98c23145cad397aa.
Report an issue: GitHub.