nats-io/nats-server · error
err
Error message
err
What it means
In the async consumer-cleanup goroutine, subscribeInternal for the delete-response reply subject failed, so no response can be received. The cleanup for that consumer is abandoned (logged via the warn helper with full context) — there is no retry loop.
Source
Thrown at server/stream.go:3052
}
respCh := make(chan *JSApiConsumerDeleteResponse, 1)
reply := infoReplySubject()
cdSub, err := acc.subscribeInternal(reply, func(sub *subscription, c *client, _ *Account, subject, reply string, rmsg []byte) {
_, msg := c.msgParts(rmsg)
var cdr JSApiConsumerDeleteResponse
if err := json.Unmarshal(msg, &cdr); err != nil {
warn(err)
return
}
select {
case respCh <- &cdr:
default:
}
})
if err != nil {
warn(err)
return
}
defer acc.unsubscribeInternal(cdSub)
// Send the delete request.
err = s.sendInternalAccountMsgWithReply(acc, subject, reply, nil, nil, false)
if err != nil {
warn(err)
return
}
select {
case cdr := <-respCh:
if cdr.Error != nil {
warn(cdr.Error)
}
case <-time.After(sourceHealthCheckInterval):
warn(errors.New("timed out"))
}View on GitHub (pinned to 3a66a489d2)
Solutions
- Inspect server subscription limits/resource pressure that caused the internal subscribe failure
- Delete the orphaned consumer manually if it remains
- Re-run stream deletion or retrigger cleanup if consumers keep accumulating
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at server/stream.go:3052 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/839c7770e92f7963.
Report an issue: GitHub.