thanos-io/thanos · error
endpoint
Error message
endpoint %s
What it means
Raised when an individual endpoint entry passes parsing but fails semantic validation — specifically when ClientConfig.validateCompression rejects the compression settings for that endpoint. The address is included in the wrapper so operators can find the bad entry. Validation runs at provider creation and on every config reload.
Solutions
- Read the inner error from validateCompression and remove/correct the compression field on the endpoint entry with the reported address.
- Use only supported compression values (e.g., empty or the enabled set for your Thanos version) and confirm peers advertise compression support.
- Remove client_config compression entirely for endpoints whose remote store does not support it.
- Re-run validation locally (unit call validateEndpointConfig or just restart) to confirm the config passes before deploying.
Example fix
// before // endpoint_groups: // - address: dns:///stores:10901 // client_config: // compression: bad-algo // after // endpoint_groups: // - address: dns:///stores:10901 // client_config: // compression: ""
Defensive patterns
Strategy: validation
Validate before calling
for _, e := range cfg.Endpoints { if e.ClientConfig != nil { if err := e.ClientConfig.validateCompression(); err != nil { return fmt.Errorf("endpoint %s: %w", e.Address, err) } } } Try / catch
if err := validateEndpointConfig(&cfg); err != nil {
log.Fatalf("endpoint config rejected: %v", err) // chained message names the address and rule
} Prevention
- Keep compression settings only on endpoints whose peers advertise support.
- Validate config in CI with the same validateEndpointConfig rules before rollout.
- Avoid copy-pasting store client_config blocks between endpoint kinds.
- Check strict-mode requirements when introducing SD-based addresses.
When it happens
Trigger: An endpoint entry in the config has a client.compression (or compression_types) value combination that validateCompression rejects, e.g., enabling compression when the store API peer doesn't support it, or an invalid compression type name.
Common situations: Copy-pasting store client config with `compression: snappy` into endpoint config where it's disallowed; typo like `compressions: [gzip]`; enabling compression against older Thanos Store peers that lack support.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- unable to unmarshal config content
- unable to validate endpoints
- unsupported compression type
- the block sync concurrency must be equal or greater than 1.
- no matchers specified (excluding selector labels)
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/bf5cc5e6a2da780b.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/endpointset.go:221
cfg.Endpoints = append(cfg.Endpoints, endpointSettings{
Address: e,
Group: true,
Strict: true,
})
}
}
func validateEndpointConfig(cfg *EndpointConfig) error {
for i := range cfg.Endpoints {
ecfg := &cfg.Endpoints[i]
if dns.IsDynamicNode(ecfg.Address) && ecfg.Strict {
return errors.Newf("%s is a dynamically specified endpoint i.e. it uses SD and that is not permitted under strict mode.", ecfg.Address)
}
if !ecfg.Group && len(ecfg.ServiceConfig) != 0 {
return errors.Newf("%s service_config is only valid for endpoint groups.", ecfg.Address)
}
if err := ecfg.ClientConfig.validateCompression(); err != nil {
return errors.Wrapf(err, "endpoint %s", ecfg.Address)
}
}
return nil
}
func newEndpointConfigProvider(
logger log.Logger,
configFile fileContent,
configReloadInterval time.Duration,
staticEndpoints []string,
staticEndpointGroups []string,
staticStrictEndpoints []string,
staticStrictEndpointGroups []string,
) (*endpointConfigProvider, error) {
res := &endpointConfigProvider{
endpoints: staticEndpoints,
endpointGroups: staticEndpointGroups,
strictEndpoints: staticStrictEndpoints,View on GitHub (pinned to 35b8b99117)