nats-io/nats-server · error

Unsafe quorum rescue stopped, quorum updated to %d

Error message

Unsafe quorum rescue stopped, quorum updated to %d

What it means

An active unsafe quorum rescue (artificially lowered quorum) has ended because the natural quorum recalculated to a value equal or below the rescued value — i.e. enough peers returned that the real quorum is now sufficient. The rescue is stopped and normal quorum is used.

Source

Thrown at server/raft.go:1306

	// a quorum.
	n.csz = csz
	n.recalcQuorum()

	n.sendPeerState()
	return nil
}

// recalcQuorum recalculates the number of nodes needed to establish quorum.
// While an unsafe quorum rescue is active (see RescueQuorum) the rescued quorum
// is kept, unless the natural quorum drops to be equal or below it.
// Lock should be held.
func (n *raft) recalcQuorum() {
	qn := n.csz/2 + 1
	if n.rescue != nil {
		if qn > n.qn {
			return
		}
		n.warn("Unsafe quorum rescue stopped, quorum updated to %d", qn)
		n.rescue.Stop()
		n.rescue = nil
	}
	n.qn = qn
}

// RescueQuorum unsafely lowers the number of nodes needed to establish quorum.
// This is a disaster recovery measure for a group that has permanently lost enough
// peers that it can't elect a leader anymore, allowing the surviving peers to
// re-form quorum and peer-remove the lost peers.
func (n *raft) RescueQuorum(qn int) (prev, cur int, err error) {
	n.Lock()
	defer n.Unlock()

	prev = n.qn
	if n.State() == Closed {
		return prev, 0, errNodeClosed
	}

View on GitHub (pinned to 3a66a489d2)

Solutions

  1. No action needed; this is the expected healthy end of a rescue
  2. Confirm lost peers are recovered or replaced to keep quorum durable
  3. Do not leave the cluster in rescued state long-term
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server/raft.go:1306 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/2681bcf34562176e. Report an issue: GitHub.