thanos-io/thanos · error
bucket store initial sync
Error message
bucket store initial sync
What it means
bs.InitialSync failed after all retries within the retry timeout: the store gateway could not list and download block metadata from object storage (network, credentials, or bucket errors). The bucket store stays uninitialized and the run group shuts down.
Solutions
- Check object storage connectivity and credentials
- Verify bucket permissions (list/get)
- Look at retried error messages for the root cause
- Retry startup once storage is healthy
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at cmd/thanos/store.go:506 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07).
Data as JSON: /api/errors/68ebbc7dc8a40a28.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/thanos/store.go:506
ctx, cancel := context.WithCancel(context.Background())
g.Add(func() error {
defer runutil.CloseWithLogOnErr(logger, insBkt, "bucket client")
level.Info(logger).Log("msg", "initializing bucket store")
begin := time.Now()
// This will stop retrying after set timeout duration.
initialSyncCtx, cancel := context.WithTimeout(ctx, retryTimeoutDuration*time.Second)
defer cancel()
// Retry in case of error.
err := runutil.Retry(retryIntervalDuration*time.Second, initialSyncCtx.Done(), func() error {
return bs.InitialSync(ctx)
})
if err != nil {
close(bucketStoreReady)
return errors.Wrap(err, "bucket store initial sync")
}
level.Info(logger).Log("msg", "bucket store ready", "init_duration", time.Since(begin).String())
close(bucketStoreReady)
err = runutil.Repeat(conf.syncInterval, ctx.Done(), func() error {
if err := bs.SyncBlocks(ctx); err != nil {
level.Warn(logger).Log("msg", "syncing blocks failed", "err", err)
}
return nil
})
runutil.CloseWithLogOnErr(logger, bs, "bucket store")
return err
}, func(error) {
cancel()
})
}View on GitHub (pinned to 35b8b99117)