thanos-io/thanos · critical
getting object store config
Error message
getting object store config
What it means
The sidecar failed to read/parse the object store configuration file given via --objstore.config-file. Content() re-reads and validates the bucket config YAML from disk on every startup (or config reload), so any disk or YAML problem surfaces wrapped as 'getting object store config'. If this fails, the sidecar cannot determine whether uploads are enabled and aborts startup.
Solutions
- Verify --objstore.config-file points to an existing, readable file (check the mounted Secret/ConfigMap volume)
- Validate the YAML with objstore.ValidateConfig (thanos tools bucket verify helpers) or run `thanos sidecar --objstore.config-file=...` to see the underlying parse error
- Ensure the bucket provider key (e.g. type: S3) matches a supported provider name for your thanos version
- Fix file permissions so the thanos process user can read the file
Example fix
// before - --objstore.config-file=/etc/thanos/objstore.yaml # file not mounted // after # ensure the secret is mounted: volumeMounts: - name: objstore mountPath: /etc/thanos readOnly: true # and objstore.yaml contains: type: S3 config: bucket: thanos ...
Defensive patterns
Strategy: validation
Validate before calling
if _, err := os.Stat(objstoreCfgPath); err != nil {
return fmt.Errorf("objstore config file missing: %w", err)
}
if err := objstore.ValidateConfig([]byte(cfgYAML)); err != nil {
return fmt.Errorf("invalid objstore config: %w", err)
} Try / catch
cfg, err := conf.objStore.Content()
if err != nil {
return fmt.Errorf("objstore config unreadable (%v); check --objstore.config-file mount", err)
} Prevention
- Mount the objstore Secret/ConfigMap explicitly and add a volume-mount check in init
- Validate bucket YAML in CI with objstore.ValidateConfig before deploy
- Use readOnly mounts at stable, versioned paths
- Pin the bucket provider type string to one supported by your thanos version
When it happens
Trigger: errors.Wrap in runSidecar when conf.objStore.Content() returns an error: the config file path given to --objstore.config-file does not exist, is unreadable (permissions), contains invalid YAML, or fails bucket config validation (e.g. unknown bucket provider in objstore.ParseConfig).
Common situations: Kubernetes Secret/ConfigMap not mounted at the expected path; typo'd file path; empty or truncated secret after a bad rollout; unsupported bucket type string like 's3' misspelled; YAML with tabs or wrong indentation.
Understand the failure class
Background: "Config file not found": what it means and how to fix it in docker-sync, Maven, Vagrant, Turborepo and other tools — this error's family across 60 libraries.
Related errors
- create syncer
- error while parsing config for request logging
- query configuration
- create meta fetcher
- unable to unmarshal config content
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/d55a07847f5e6f1b.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/sidecar.go:140
httpClient *http.Client,
grpcLogOpts []grpc_logging.Option,
logFilterMethods []string,
) error {
var m = &promMetadata{
promURL: conf.prometheus.url,
// Start out with the full time range. The shipper will constrain it later.
// TODO(fabxc): minimum timestamp is never adjusted if shipping is disabled.
mint: conf.limitMinTime.PrometheusTimestamp(),
maxt: math.MaxInt64,
limitMinTime: conf.limitMinTime,
client: promclient.NewWithTracingClient(logger, httpClient, "thanos-sidecar"),
}
confContentYaml, err := conf.objStore.Content()
if err != nil {
return errors.Wrap(err, "getting object store config")
}
var uploads = len(confContentYaml) != 0
if !uploads {
level.Info(logger).Log("msg", "no supported bucket was configured, uploads will be disabled")
}
grpcProbe := prober.NewGRPC()
httpProbe := prober.NewHTTP()
statusProber := prober.Combine(
httpProbe,
grpcProbe,
prober.NewInstrumentation(comp, logger, extprom.WrapRegistererWithPrefix("thanos_", reg)),
)
// Setup the HTTP server.
{
srv := httpserver.New(logger, reg, comp, httpProbe,View on GitHub (pinned to 35b8b99117)