thanos-io/thanos · warning
No StoreAPIs available
Error message
No StoreAPIs available
What it means
ErrorNoStoresAvailable is a sentinel error returned when the proxy's store discovery produced an empty store list and the request cannot tolerate it (PartialResponseDisabled or ABORT strategy). It means discovery has not completed yet or all stores have disappeared, so the query cannot be served at all.
Solutions
- Retry the query after discovery completes (or wait for readiness endpoints before routing traffic)
- Verify store endpoints are registered and healthy (DNS, k8s services, gossip membership)
- If empty results are acceptable, use PartialResponseStrategy_ALLOWED so an empty store list doesn't fail the query
- Check store service discovery configuration (static addresses, file_sd, kubernetes SD) for typos
Defensive patterns
Strategy: retry
Validate before calling
// check discovery readiness before sending queries
if storeClient.Ready() == false { return errors.New("store discovery not complete; retry later") } Try / catch
resp, err := queryClient.Series(ctx, req)
if err != nil && strings.Contains(err.Error(), ErrorNoStoresAvailable.Error()) {
// wait/backoff and retry once discovery completes
time.Sleep(retryDelay)
resp, err = queryClient.Series(ctx, req)
} Prevention
- Gate traffic on the query readiness endpoint after startup
- Monitor registered store count and alert on zero-store conditions
- Use PartialResponseStrategy_ALLOWED if queries may legitimately run with no stores
- Verify service discovery (DNS/k8s/gossip) yields at least one healthy endpoint
When it happens
Trigger: Series called on a proxy Store immediately after startup before registry/servicediscovery populated stores, or after all stores were removed/unregistered, while running in ABORT or partial-response-disabled mode.
Common situations: Thanos Query starting up and receiving queries before endpoint discovery finishes; all StoreAPI endpoints unhealthy/deregistered from gossip/DNS; misconfigured service discovery yielding zero endpoints.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- unknown partial response strategy
- add thanos opts query params
- unexpected result aggregate type
- no valid chunk found
- got empty chunks
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/77ea33289e58eb28.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/store/proxy.go:53
"github.com/thanos-io/thanos/pkg/tenancy"
)
type ctxKey int
// UninitializedTSDBTime is the TSDB start time of an uninitialized TSDB instance.
const UninitializedTSDBTime = math.MaxInt64
// StoreMatcherKey is the context key for the store's allow list.
const StoreMatcherKey = ctxKey(0)
// ErrorNoStoresMatched is returned if the query does not match any data.
// This can happen with Query servers trees and external labels.
var ErrorNoStoresMatched = errors.New("No StoreAPIs matched for this query")
// ErrorNoStoresAvailable is returned if we have an empty list of stores.
// This happens either when we didn't yet complete any discovery
// or when all stores disappear suddenly.
var ErrorNoStoresAvailable = errors.New("No StoreAPIs available")
// Client holds meta information about a store.
type Client interface {
// StoreClient to access the store.
storepb.StoreClient
// LabelSets that each apply to some data exposed by the backing store.
LabelSets() []labels.Labels
// TimeRange returns minimum and maximum time range of data in the store.
TimeRange() (mint int64, maxt int64)
// TSDBInfos returns metadata about each TSDB backed by the client.
TSDBInfos() []infopb.TSDBInfo
// SupportsSharding returns true if sharding is supported by the underlying store.
SupportsSharding() bool
View on GitHub (pinned to 35b8b99117)