kopia/kopia · error

error listing index blobs

Error message

error listing index blobs

What it means

Wraps a failure from blob.ListAllBlobs when listing V0IndexBlobPrefix blobs inside ListActiveIndexBlobs (index_blob_manager_v0.go:112). It runs in parallel with the compaction-log listing; if the storage ListBlobs for index blobs fails, this error is returned and then wrapped as 'error listing indexes'. The repository cannot enumerate its index blobs, so index reads/writes fail.

Solutions

  1. Inspect the unwrapped storage error to identify auth vs network vs throttling.
  2. Grant list permission on the storage container for the configured credentials.
  3. Retry after the storage backend recovers; the listing is read-only.
Defensive patterns

Strategy: retry

Validate before calling

// Go: preflight listing on the index blob prefix before full enumeration
if err := st.ListBlobs(ctx, blob.IDPrefix("n"), func(blob.Metadata) error { return nil }); err != nil {
	return errors.Wrap(err, "index blob listing unavailable")
}

Try / catch

if err := eg.Wait(); err != nil {
	if isTransientStorageError(err) { /* retry ListActiveIndexBlobs */ }
	return errors.Wrap(err, "error listing index blobs")
}

Prevention

When it happens

Trigger: blob.ListAllBlobs(ctx, m.st, V0IndexBlobPrefix) errors — storage backend list failure (auth, network, throttling) or context cancellation.

Common situations: Object storage IAM lacking list permission, transient 503 from the provider, client shutting down and canceling the context mid-list.

Understand the failure class

Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.

Related errors


AI-assisted analysis of kopia/kopia@82495e54b5 (2026-09-07). Data as JSON: /api/errors/bdf3976090b88465. Report an issue: GitHub.

Appendix: source

Thrown at repo/content/indexblob/index_blob_manager_v0.go:112

// before which all deleted index entries should be treated as non-existent.
func (m *ManagerV0) ListActiveIndexBlobs(ctx context.Context) ([]Metadata, time.Time, error) {
	var compactionLogMetadata, storageIndexBlobs []blob.Metadata

	var eg errgroup.Group

	// list index and cleanup blobs in parallel.
	eg.Go(func() error {
		v, err := blob.ListAllBlobs(ctx, m.st, V0CompactionLogBlobPrefix)
		compactionLogMetadata = v

		return errors.Wrap(err, "error listing compaction blobs")
	})

	eg.Go(func() error {
		v, err := blob.ListAllBlobs(ctx, m.st, V0IndexBlobPrefix)
		storageIndexBlobs = v

		return errors.Wrap(err, "error listing index blobs")
	})

	if err := eg.Wait(); err != nil {
		return nil, time.Time{}, errors.Wrap(err, "error listing indexes")
	}

	contentlog.Log2(ctx, m.log, "found index blobs",
		blobparam.BlobMetadataList("storageIndexBlobs", storageIndexBlobs),
		blobparam.BlobMetadataList("compactionLogMetadata", compactionLogMetadata))

	indexMap := map[blob.ID]*Metadata{}
	addBlobsToIndex(indexMap, storageIndexBlobs)

	compactionLogs, err := m.getCompactionLogEntries(ctx, compactionLogMetadata)
	if err != nil {
		return nil, time.Time{}, errors.Wrap(err, "error reading compaction log")
	}

View on GitHub (pinned to 82495e54b5)