{"record":{"id":"33f1d1c20d7c7f60","repo":"thanos-io/thanos","slug":"not-ready-33f1d1","errorCode":null,"errorMessage":"Not ready","messagePattern":"Not ready","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/thanos/sidecar.go","lineNumber":347,"sourceCode":"\t\texemplarSrv := exemplars.NewPrometheus(conf.prometheus.url, c, m.Labels)\n\n\t\tinfoSrv := info.NewInfoServer(\n\t\t\tcomponent.Sidecar.String(),\n\t\t\tinfo.WithLabelSetFunc(func() []labelpb.ZLabelSet {\n\t\t\t\treturn promStore.LabelSet()\n\t\t\t}),\n\t\t\tinfo.WithStoreInfoFunc(func() (*infopb.StoreInfo, error) {\n\t\t\t\tif httpProbe.IsReady() {\n\t\t\t\t\tmint, maxt := m.Timestamps()\n\t\t\t\t\treturn &infopb.StoreInfo{\n\t\t\t\t\t\tMinTime:                      mint,\n\t\t\t\t\t\tMaxTime:                      maxt,\n\t\t\t\t\t\tSupportsSharding:             true,\n\t\t\t\t\t\tSupportsWithoutReplicaLabels: true,\n\t\t\t\t\t\tTsdbInfos:                    promStore.TSDBInfos(),\n\t\t\t\t\t}, nil\n\t\t\t\t}\n\t\t\t\treturn nil, errors.New(\"Not ready\")\n\t\t\t}),\n\t\t\tinfo.WithExemplarsInfoFunc(),\n\t\t\tinfo.WithRulesInfoFunc(),\n\t\t\tinfo.WithTargetsInfoFunc(),\n\t\t\tinfo.WithMetricMetadataInfoFunc(),\n\t\t\tinfo.WithStatusInfoFunc(),\n\t\t)\n\n\t\tstatusSrv := status.NewServer(\n\t\t\tcomponent.Sidecar.String(),\n\t\t\tstatus.WithTSDBStatisticsGetter(\n\t\t\t\tstatus.TSDBStatisticsGetterFunc(func(limit int, matchers []storepb.LabelMatcher) (map[string]tsdb.Stats, error) {\n\t\t\t\t\tif !httpProbe.IsReady() {\n\t\t\t\t\t\treturn nil, errors.New(\"not ready\")\n\t\t\t\t\t}\n\n\t\t\t\t\tctx, cancel := context.WithTimeout(context.Background(), conf.prometheus.getConfigTimeout)\n\t\t\t\t\tdefer cancel()","sourceCodeStart":329,"sourceCodeEnd":365,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/sidecar.go#L329-L365","documentation":"The Info service's TSDBInfos getter returns errors.New(\"Not ready\") when the sidecar's HTTP readiness probe has not yet succeeded. Clients calling the gRPC Info API before the sidecar has validated Prometheus connectivity and loaded labels get this sentinel error instead of TSDB info.","triggerScenarios":"gRPC info.InfoServer Info/TSDBInfos RPC invoked while httpProbe.IsReady() is false — during startup before external labels were fetched, or after a readiness-affecting failure.","commonSituations":"Store Gateway/Compactor querying the sidecar immediately after rollout; load balancers probing the Info API before readiness; monitoring scraping info RPCs at boot.","solutions":["Wait for the sidecar's HTTP readiness endpoint (/-/ready) to report ready before querying Info API","Configure clients (store gateways) to retry on 'Not ready' errors during rollout","Gate traffic with Kubernetes readiness probes on the gRPC/HTTP ports","If never becomes ready, fix the underlying startup error (see earlier sidecar logs)"],"exampleFix":"// before\nresp, err := infoClient.Info(ctx, &infoPb.InfoReq{})   // right after pod start\n// after\nerr := wait.PollImmediate(2*time.Second, 2*time.Minute, func() (bool, error) {\n    return probeReady(sidecarHTTPAddr) == nil, nil\n})\nresp, err := infoClient.Info(ctx, &infoPb.InfoReq{})","handlingStrategy":"retry","validationCode":"ready, err := isSidecarReady(sidecarHTTPAddr)\nif err != nil || !ready {\n    return errors.New(\"sidecar info API not ready yet, defer Info RPC\")\n}","typeGuard":null,"tryCatchPattern":"err := wait.PollImmediate(2*time.Second, timeout, func() (bool, error) {\n    _, err := infoClient.Info(ctx, &infoPb.InfoReq{})\n    return err == nil, nil\n})","preventionTips":["Respect the sidecar's HTTP readiness probe before querying Info API","Configure clients to tolerate and retry 'Not ready' during rollouts","Gate store-gateway discovery of new sidecars on readiness","Monitor sidecar startup duration for regressions"],"tags":["grpc","readiness","info-api","thanos"],"backgroundTag":"service-not-ready","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"}