{"record":{"id":"13f2389d972fa1b3","repo":"thanos-io/thanos","slug":"unable-to-create-new-hashring-from-config","errorCode":null,"errorMessage":"unable to create new hashring from config","messagePattern":"unable to create new hashring from config","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/receive.go","lineNumber":665,"sourceCode":"\n\t\tif enableIngestion {\n\t\t\tdefer close(hashringChangedChan)\n\t\t}\n\n\t\tfor {\n\t\t\tselect {\n\t\t\tcase c, ok := <-updates:\n\t\t\t\tif !ok {\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\n\t\t\t\tif c == nil {\n\t\t\t\t\twebHandler.Hashring(receive.SingleNodeHashring(conf.endpoint))\n\t\t\t\t\tlevel.Info(logger).Log(\"msg\", \"Empty hashring config. Set up single node hashring.\")\n\t\t\t\t} else {\n\t\t\t\t\th, err := receive.NewMultiHashring(algorithm, conf.replicationFactor, c, reg)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn errors.Wrap(err, \"unable to create new hashring from config\")\n\t\t\t\t\t}\n\t\t\t\t\twebHandler.Hashring(h)\n\t\t\t\t\tlevel.Info(logger).Log(\"msg\", \"Set up hashring for the given hashring config.\")\n\t\t\t\t}\n\n\t\t\t\tif err := dbs.SetHashringConfig(c); err != nil {\n\t\t\t\t\treturn errors.Wrap(err, \"failed to set hashring config in MultiTSDB\")\n\t\t\t\t}\n\n\t\t\t\t// If ingestion is enabled, send a signal to TSDB to flush.\n\t\t\t\tif enableIngestion {\n\t\t\t\t\thashringChangedChan <- struct{}{}\n\t\t\t\t} else {\n\t\t\t\t\t// If not, just signal we are ready (this is important during first hashring load)\n\t\t\t\t\tstatusProber.Ready()\n\t\t\t\t}\n\t\t\tcase <-cancel:\n\t\t\t\treturn nil","sourceCodeStart":647,"sourceCodeEnd":683,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/receive.go#L647-L683","documentation":"receive.NewMultiHashring failed while applying a new hashring config update, e.g. invalid algorithm/endpoint combination or malformed endpoints. The goroutine returns the error, terminating the run group.","triggerScenarios":"Thrown at cmd/thanos/receive.go:665 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the hashring algorithm flag matches the config","Validate endpoints format (host:port)","Review replicationFactor and registry options"],"exampleFix":null,"handlingStrategy":"try-catch","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"}