{"record":{"id":"570b18f57dcc8cc9","repo":"thanos-io/thanos","slug":"failed-to-validate-hashring-configuration-content","errorCode":null,"errorMessage":"failed to validate hashring configuration content","messagePattern":"failed to validate hashring configuration content","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/receive.go","lineNumber":630,"sourceCode":"\t\t}\n\n\t\tctx, cancel := context.WithCancel(context.Background())\n\t\tg.Add(func() error {\n\t\t\treturn receive.ConfigFromWatcher(ctx, updates, cw)\n\t\t}, func(error) {\n\t\t\tcancel()\n\t\t})\n\t} else {\n\t\tvar (\n\t\t\tcf  []receive.HashringConfig\n\t\t\terr error\n\t\t)\n\t\t// The Hashrings config file content given initialize configuration from content.\n\t\tif len(conf.hashringsFileContent) > 0 {\n\t\t\tcf, err = receive.ParseConfig([]byte(conf.hashringsFileContent))\n\t\t\tif err != nil {\n\t\t\t\tclose(updates)\n\t\t\t\treturn errors.Wrap(err, \"failed to validate hashring configuration content\")\n\t\t\t}\n\t\t}\n\n\t\tcancel := make(chan struct{})\n\t\tg.Add(func() error {\n\t\t\tdefer close(updates)\n\t\t\tupdates <- cf\n\t\t\t<-cancel\n\t\t\treturn nil\n\t\t}, func(error) {\n\t\t\tclose(cancel)\n\t\t})\n\t}\n\n\tcancel := make(chan struct{})\n\tg.Add(func() error {\n\n\t\tif enableIngestion {","sourceCodeStart":612,"sourceCodeEnd":648,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/receive.go#L612-L648","documentation":"Wraps a receive.ParseConfig failure on the inline hashring configuration passed via --receive.hashrings-file-content (the single-node / no-watcher path). The supplied JSON content is syntactically invalid or semantically invalid as a hashring config, so no initial hashring can be established.","triggerScenarios":"Thrown at cmd/thanos/receive.go:630 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the inline hashring content JSON/YAML","Compare against the documented hashring config format","Test with a minimal single-endpoint config"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}