{"record":{"id":"bc827ecee3df59f2","repo":"thanos-io/thanos","slug":"not-ready","errorCode":null,"errorMessage":"Not ready","messagePattern":"Not ready","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/thanos/query.go","lineNumber":641,"sourceCode":"\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"setup gRPC server\")\n\t\t}\n\n\t\tinfoSrv := info.NewInfoServer(\n\t\t\tcomponent.Query.String(),\n\t\t\tinfo.WithLabelSetFunc(func() []labelpb.ZLabelSet { return proxyStore.LabelSet() }),\n\t\t\tinfo.WithStoreInfoFunc(func() (*infopb.StoreInfo, error) {\n\t\t\t\tif httpProbe.IsReady() {\n\t\t\t\t\tmint, maxt := proxyStore.TimeRange()\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:                    proxyStore.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.WithMetricMetadataInfoFunc(),\n\t\t\tinfo.WithTargetsInfoFunc(),\n\t\t\tinfo.WithQueryAPIInfoFunc(),\n\t\t\tinfo.WithStatusInfoFunc(),\n\t\t)\n\n\t\tdefaultEngineType := querypb.EngineType(querypb.EngineType_value[string(defaultEngine)])\n\t\tgrpcAPI := apiv1.NewGRPCAPI(time.Now, queryReplicaLabels, queryableCreator, remoteEndpointsCreator, queryCreator, defaultEngineType, lookbackDeltaCreator, instantDefaultMaxSourceResolution)\n\t\ts := grpcserver.New(logger, reg, tracer, grpcLogOpts, logFilterMethods, comp, grpcProbe,\n\t\t\tgrpcserver.WithServer(apiv1.RegisterQueryServer(grpcAPI)),\n\t\t\tgrpcserver.WithServer(store.RegisterStoreServer(seriesProxy, logger)),\n\t\t\tgrpcserver.WithServer(rules.RegisterRulesServer(rulesProxy)),\n\t\t\tgrpcserver.WithServer(targets.RegisterTargetsServer(targetsProxy)),\n\t\t\tgrpcserver.WithServer(metadata.RegisterMetadataServer(metadataProxy)),\n\t\t\tgrpcserver.WithServer(exemplars.RegisterExemplarsServer(exemplarsProxy)),","sourceCodeStart":623,"sourceCodeEnd":659,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/query.go#L623-L659","documentation":"The query component's info server StoreInfoFunc reports store metadata (min/max time, TSDB infos). Before the proxy store has populated its state, it returns errors.New(\"Not ready\") so callers (InfoAPI clients) know to retry later rather than receive empty/zero metadata.","triggerScenarios":"A client (e.g. another Thanos component or `thanos tools bucket` UI) calls the StoreInfo RPC against a query instance whose proxy store has not yet discovered/synced any store endpoints, so the readiness condition inside WithStoreInfoFunc is unmet.","commonSituations":"Query just started and store discovery (via sidecar endpoints or DNS) hasn't completed; store endpoints unreachable so the proxy never becomes ready; monitoring/alerting scraping InfoAPI immediately after pod start.","solutions":["Wait and retry — this is an expected transient state during startup; add retry/backoff on the client.","Check that store endpoints are configured and reachable (--store, --endpoint, service discovery).","Verify gRPC connectivity between the caller and the query instance.","If it persists, inspect query logs for store discovery/sync failures."],"exampleFix":"// before\ninfo, err := storeClient.StoreInfo(ctx, req)  // fails at startup\n// after\nerr := backoff.Retry(func() error { info, err = storeClient.StoreInfo(ctx, req); return err }, backoff.WithContext(b, ctx))","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := backoff.Retry(func() error {\n    info, err := client.StoreInfo(ctx, req)\n    if err != nil {\n        if strings.Contains(err.Error(), \"Not ready\") {\n            return backoff.Permanent(err) // or retry, per need\n        }\n        return err\n    }\n    return nil\n}, backoff.WithContext(backoff.NewExponentialBackOff(), ctx))","preventionTips":["Add startup retry with exponential backoff on StoreInfo calls","Delay readiness checks until the query proxy has synced stores","Verify store endpoints are configured and reachable","Alert on persistent (not transient) 'Not ready' responses"],"tags":["grpc","readiness","startup"],"backgroundTag":"request-timeout","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"}