thanos-io/thanos · error
create syncer
Error message
create syncer
What it means
Wraps an error from block.NewMetaFetcher ("create syncer") when building the bucket metadata syncer in runCompact. The syncer lists and syncs block metadata from object storage; failures here usually stem from bucket access problems or invalid syncer options.
Solutions
- Read the wrapped cause and fix the failing syncer option.
- Validate --selector.relabel-config syntax and label filters.
- Verify bucket flags/bucket config file points to a valid object store.
Example fix
// before --selector.relabel-config=selconf.yml # file missing/invalid // after # fix or remove the relabel config, ensure file exists and is valid YAML
Defensive patterns
Strategy: try-catch
Validate before calling
if selectorRelabelConfig != "" {
if _, err := os.Stat(selectorRelabelConfig); err != nil {
return fmt.Errorf("selector relabel config not readable: %w", err)
}
} Try / catch
if err := runCompact(...); err != nil {
var wf *errors.wrappingError
if strings.Contains(err.Error(), "create syncer") {
logger.Error(err, "meta syncer init failed; check relabel config and bucket access")
}
return err
} Prevention
- Validate --selector.relabel-config as YAML at deploy time
- Test bucket credentials with a lightweight list call before starting compact
- Keep meta-sync related flags consistent with your Thanos version
When it happens
Trigger: block.NewMetaFetcher returns an error, e.g. invalid filter configuration (bad time-partition or label values in --selector.relabel-config paths) or constructor-time validation failure.
Common situations: Malformed --selector.relabel-config producing invalid meta filters; invalid ignore-deletion-mark or consistency-delay options; misconfigured bucket flags.
Related errors
- getting object store config
- create meta fetcher
- unable to load config file
- unable to create config reloader
- unable to load config initially
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/350ed3f22c0cad0a.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/compact.go:306
})
var syncMetasTimeout = conf.waitInterval
if !conf.wait {
syncMetasTimeout = 0
}
sy, err = compact.NewMetaSyncer(
logger,
reg,
insBkt,
cf,
duplicateBlocksFilter,
ignoreDeletionMarkFilter,
compactMetrics.blocksMarked.WithLabelValues(metadata.DeletionMarkFilename, ""),
compactMetrics.garbageCollectedBlocks,
syncMetasTimeout,
)
if err != nil {
return errors.Wrap(err, "create syncer")
}
}
levels, err := compactions.levels(conf.maxCompactionLevel)
if err != nil {
return errors.Wrap(err, "get compaction levels")
}
if conf.maxCompactionLevel < compactions.maxLevel() {
level.Warn(logger).Log("msg", "Max compaction level is lower than should be", "current", conf.maxCompactionLevel, "default", compactions.maxLevel())
}
ctx, cancel := context.WithCancel(context.Background())
ctx = tracing.ContextWithTracer(ctx, tracer)
defer func() {
if rerr != nil {
cancel()View on GitHub (pinned to 35b8b99117)