thanos-io/thanos · warning

Not ready

Error message

Not ready

What it means

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.

Solutions

  1. Wait and retry — this is an expected transient state during startup; add retry/backoff on the client.
  2. Check that store endpoints are configured and reachable (--store, --endpoint, service discovery).
  3. Verify gRPC connectivity between the caller and the query instance.
  4. If it persists, inspect query logs for store discovery/sync failures.

Example fix

// before
info, err := storeClient.StoreInfo(ctx, req)  // fails at startup
// after
err := backoff.Retry(func() error { info, err = storeClient.StoreInfo(ctx, req); return err }, backoff.WithContext(b, ctx))
Defensive patterns

Strategy: retry

Try / catch

err := backoff.Retry(func() error {
    info, err := client.StoreInfo(ctx, req)
    if err != nil {
        if strings.Contains(err.Error(), "Not ready") {
            return backoff.Permanent(err) // or retry, per need
        }
        return err
    }
    return nil
}, backoff.WithContext(backoff.NewExponentialBackOff(), ctx))

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.

Related errors


AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07). Data as JSON: /api/errors/bc827ecee3df59f2. Report an issue: GitHub.

Appendix: source

Thrown at cmd/thanos/query.go:641

		if err != nil {
			return errors.Wrap(err, "setup gRPC server")
		}

		infoSrv := info.NewInfoServer(
			component.Query.String(),
			info.WithLabelSetFunc(func() []labelpb.ZLabelSet { return proxyStore.LabelSet() }),
			info.WithStoreInfoFunc(func() (*infopb.StoreInfo, error) {
				if httpProbe.IsReady() {
					mint, maxt := proxyStore.TimeRange()
					return &infopb.StoreInfo{
						MinTime:                      mint,
						MaxTime:                      maxt,
						SupportsSharding:             true,
						SupportsWithoutReplicaLabels: true,
						TsdbInfos:                    proxyStore.TSDBInfos(),
					}, nil
				}
				return nil, errors.New("Not ready")
			}),
			info.WithExemplarsInfoFunc(),
			info.WithRulesInfoFunc(),
			info.WithMetricMetadataInfoFunc(),
			info.WithTargetsInfoFunc(),
			info.WithQueryAPIInfoFunc(),
			info.WithStatusInfoFunc(),
		)

		defaultEngineType := querypb.EngineType(querypb.EngineType_value[string(defaultEngine)])
		grpcAPI := apiv1.NewGRPCAPI(time.Now, queryReplicaLabels, queryableCreator, remoteEndpointsCreator, queryCreator, defaultEngineType, lookbackDeltaCreator, instantDefaultMaxSourceResolution)
		s := grpcserver.New(logger, reg, tracer, grpcLogOpts, logFilterMethods, comp, grpcProbe,
			grpcserver.WithServer(apiv1.RegisterQueryServer(grpcAPI)),
			grpcserver.WithServer(store.RegisterStoreServer(seriesProxy, logger)),
			grpcserver.WithServer(rules.RegisterRulesServer(rulesProxy)),
			grpcserver.WithServer(targets.RegisterTargetsServer(targetsProxy)),
			grpcserver.WithServer(metadata.RegisterMetadataServer(metadataProxy)),
			grpcserver.WithServer(exemplars.RegisterExemplarsServer(exemplarsProxy)),

View on GitHub (pinned to 35b8b99117)