{"record":{"id":"350ed3f22c0cad0a","repo":"thanos-io/thanos","slug":"create-syncer","errorCode":null,"errorMessage":"create syncer","messagePattern":"create syncer","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/compact.go","lineNumber":306,"sourceCode":"\t\t})\n\n\t\tvar syncMetasTimeout = conf.waitInterval\n\t\tif !conf.wait {\n\t\t\tsyncMetasTimeout = 0\n\t\t}\n\t\tsy, err = compact.NewMetaSyncer(\n\t\t\tlogger,\n\t\t\treg,\n\t\t\tinsBkt,\n\t\t\tcf,\n\t\t\tduplicateBlocksFilter,\n\t\t\tignoreDeletionMarkFilter,\n\t\t\tcompactMetrics.blocksMarked.WithLabelValues(metadata.DeletionMarkFilename, \"\"),\n\t\t\tcompactMetrics.garbageCollectedBlocks,\n\t\t\tsyncMetasTimeout,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"create syncer\")\n\t\t}\n\t}\n\n\tlevels, err := compactions.levels(conf.maxCompactionLevel)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"get compaction levels\")\n\t}\n\n\tif conf.maxCompactionLevel < compactions.maxLevel() {\n\t\tlevel.Warn(logger).Log(\"msg\", \"Max compaction level is lower than should be\", \"current\", conf.maxCompactionLevel, \"default\", compactions.maxLevel())\n\t}\n\n\tctx, cancel := context.WithCancel(context.Background())\n\tctx = tracing.ContextWithTracer(ctx, tracer)\n\n\tdefer func() {\n\t\tif rerr != nil {\n\t\t\tcancel()","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/compact.go#L288-L324","documentation":"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.","triggerScenarios":"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.","commonSituations":"Malformed --selector.relabel-config producing invalid meta filters; invalid ignore-deletion-mark or consistency-delay options; misconfigured bucket flags.","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."],"exampleFix":"// before\n--selector.relabel-config=selconf.yml   # file missing/invalid\n// after\n# fix or remove the relabel config, ensure file exists and is valid YAML","handlingStrategy":"try-catch","validationCode":"if selectorRelabelConfig != \"\" {\n    if _, err := os.Stat(selectorRelabelConfig); err != nil {\n        return fmt.Errorf(\"selector relabel config not readable: %w\", err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := runCompact(...); err != nil {\n    var wf *errors.wrappingError\n    if strings.Contains(err.Error(), \"create syncer\") {\n        logger.Error(err, \"meta syncer init failed; check relabel config and bucket access\")\n    }\n    return err\n}","preventionTips":["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"],"tags":["object-storage","startup","config"],"backgroundTag":"missing-config-file","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}