vitessio/vitess · error
no PushBackend registered with name %s
Error message
no PushBackend registered with name %s
What it means
pushAll in go/stats/export.go looks up the currently configured stats backend (statsBackend) in the pushBackends registry and fails when no PushBackend with that name has been registered. It indicates a configuration/name mismatch between the requested push backend and the ones registered at init time.
Source
Thrown at go/stats/export.go:131
var defaultVarGroup = varGroup{vars: make(map[string]expvar.Var)}
// Register allows you to register a callback function
// that will be called whenever a new stats variable gets
// created. This can be used to build alternate methods
// of exporting stats variables.
func Register(nvh NewVarHook) {
defaultVarGroup.register(nvh)
}
// Publish is expvar.Publish+hook
func Publish(name string, v expvar.Var) {
publish(name, v)
}
func pushAll() error {
backend, ok := pushBackends[statsBackend]
if !ok {
return fmt.Errorf("no PushBackend registered with name %s", statsBackend)
}
return backend.PushAll()
}
func pushOne(name string, v Variable) error {
backend, ok := pushBackends[statsBackend]
if !ok {
return fmt.Errorf("no PushBackend registered with name %s", statsBackend)
}
return backend.PushOne(name, v)
}
// StringMapFuncWithMultiLabels is a multidimensional string map publisher.
//
// Map keys are compound names made with joining multiple strings with '.',
// and are named by corresponding key labels.
//
// Map values are any string, and are named by the value label.View on GitHub (pinned to 01a25a7d17)
Solutions
- Correct the configured backend name to one of the registered names (e.g. "opentsdb")
- Add a blank import of the package that registers the backend (e.g. _ "vitess.io/vitess/go/stats/opentsdb")
- Enumerate pushBackends (or check package init functions) to confirm available names
Example fix
// before import "vitess.io/vitess/go/stats" // backend never registered // after import _ "vitess.io/vitess/go/stats/opentsdb" // registers "opentsdb" PushBackend
Defensive patterns
Strategy: validation
Validate before calling
if _, ok := stats.PushBackends()["opentsdb"]; !ok {
return errors.New("opentsdb PushBackend not registered; add blank import")
} Try / catch
if err := pushAll(); err != nil {
if strings.HasPrefix(err.Error(), "no PushBackend registered") {
log.Error("stats backend not registered", slog.Any("error", err))
}
} Prevention
- Blank-import every stats backend package you configure (e.g. _ ".../go/stats/opentsdb")
- Keep backend names in one constants file referenced by both config and registration
- Smoke-test stats export at startup and fail fast on unregistered backends
When it happens
Trigger: Setting the stats push backend name to something no package registered (e.g. importing stats/opentsdb but requesting a different name), then emitToBackend -> pushAll runs on the push timer.
Common situations: Typo in the backend name flag/config; forgetting to import (blank import) the package that registers the backend; backend registered under a renamed identifier after an upgrade.
Related errors
- --batch-size requires 'direct' ddl_strategy
- --batch-size conflicts with --uuid-list. Batching does not s
- --batch-size only allowed when all queries are CREATE TABLE|
- failed to load static auth plugin. Plugin configured but grp
- failed to parse --opentsdb-uri %s: %v
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/1f8b4ec11643be85.
Report an issue: GitHub.