thanos-io/thanos · error
unable to validate endpoints
Error message
unable to validate endpoints
What it means
Wrapper raised in newEndpointConfigProvider when validateEndpointConfig rejects the initially parsed endpoint configuration. Validation covers strict-mode rules (no SD endpoints), service_config only for groups, and per-endpoint client compression checks. The specific rule violation is chained beneath this message.
Solutions
- Read the chained error to find the offending endpoint address and rule; fix that entry (remove SD endpoints under strict mode, or disable strict mode).
- Move service_config onto endpoint group entries only.
- Fix or drop the endpoint's client_config compression settings per validateCompression rules.
- Validate the config file offline before deploy (same YAML against the EndpointConfig schema + rules).
Example fix
// before: strict mode with SD endpoint // endpoints: // - address: dnssrv+_grpc._tcp.stores:10901 // after: use group or static address // endpoint_groups: // - address: dnssrv+_grpc._tcp.stores:10901 // group: true
Defensive patterns
Strategy: validation
Validate before calling
if strictMode { for _, e := range cfg.Endpoints { if strings.HasPrefix(e.Address, "dnssrv") || strings.Contains(e.Address, "/") { return fmt.Errorf("SD endpoint %s not allowed in strict mode", e.Address) } } } Try / catch
_, err := newEndpointConfigProvider(...)
if err != nil && strings.Contains(err.Error(), "unable to validate endpoints") {
log.Fatalf("endpoint config validation failed: %v", err)
} Prevention
- Document strict-mode rules for operators; validate before enabling the flag.
- Only set service_config on endpoint group entries.
- Dry-run validation locally with the same Thanos version.
- Keep endpoint entries minimal; drop unused client_config fields.
When it happens
Trigger: The config contains a dynamic (SD-based) endpoint while --endpoint-strict-mode is enabled; service_config set on a non-group endpoint; or an endpoint's ClientConfig fails validateCompression.
Common situations: Operator enables strict mode but keeps file-SD endpoints in the config; adds service_config to a plain endpoint entry; compression settings unsupported by peers or invalid values.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- unable to unmarshal config content
- endpoint
- the block sync concurrency must be equal or greater than 1.
- unsupported format for label
- --auto-gomemlimit.ratio must be greater than 0 and less…
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/5616c75bb1037810.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/endpointset.go:253
) (*endpointConfigProvider, error) {
res := &endpointConfigProvider{
endpoints: staticEndpoints,
endpointGroups: staticEndpointGroups,
strictEndpoints: staticStrictEndpoints,
strictEndpointGroups: staticStrictEndpointGroups,
}
if configFile == nil {
configFile = extkingpin.NewNopConfig()
}
cfg, err := res.parse(configFile)
if err != nil {
return nil, errors.Wrapf(err, "unable to load config file")
}
res.addStaticEndpoints(&cfg)
if err := validateEndpointConfig(&cfg); err != nil {
return nil, errors.Wrapf(err, "unable to validate endpoints")
}
res.cfg = cfg
// only static endpoints
if len(configFile.Path()) == 0 {
return res, nil
}
if err := extkingpin.PathContentReloader(context.Background(), configFile, logger, func() {
res.mu.Lock()
defer res.mu.Unlock()
level.Info(logger).Log("msg", "reloading endpoint config")
cfg, err := res.parse(configFile)
if err != nil {
level.Error(logger).Log("msg", "failed to reload endpoint config", "err", err)
return
}View on GitHub (pinned to 35b8b99117)