vitessio/vitess · error

FindTablets(cluster = %s): %w

Error message

FindTablets(cluster = %s): %w

What it means

VTAdmin's FindTabletsAcrossClusters fans out per-cluster tablet lookups in goroutines and collects failures in an errors.Group; this error wraps the underlying failure from cluster.FindTablets for cluster c.ID. FindTablets queries the topology (topo server) for tablets, so failures are usually topo connectivity or data issues.

Source

Thrown at go/vt/vtadmin/api.go:2951

		tablets []*vtadminpb.Tablet
	)

	for _, c := range clusters {
		if !api.authz.IsAuthorized(ctx, c.ID, resource, action) {
			continue
		}

		wg.Add(1)

		go func(c *cluster.Cluster) {
			defer wg.Done()

			ts, err := c.FindTablets(ctx, func(t *vtadminpb.Tablet) bool {
				return topoproto.TabletAliasEqual(t.Tablet.Alias, alias)
			}, -1)
			if err != nil {
				rec.RecordError(fmt.Errorf("FindTablets(cluster = %s): %w", c.ID, err))
				return
			}

			m.Lock()
			tablets = append(tablets, ts...)
			m.Unlock()
		}(c)
	}

	wg.Wait()

	if rec.HasErrors() {
		return nil, nil, rec.Error()
	}

	switch len(tablets) {
	case 0:
		return nil, nil, vterrors.Errorf(vtrpcpb.Code_NOT_FOUND, "%s: %s, searched clusters = %v", errors.ErrNoTablet, alias, ids)

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Read the wrapped inner error to identify which cluster/topo call failed and fix topo connectivity (etcd/zk address, auth) for that cluster
  2. Verify the tablet alias value and that the tablet exists in the topo
  3. Retry once topo access is restored; check vitess topo server health
Defensive patterns

Strategy: retry

Validate before calling

// check topo reachability for the cluster before fan-out
if err := pingTopo(clusterID); err != nil {
    return fmt.Errorf("topo for %s unreachable: %w", clusterID, err)
}

Try / catch

tablets, err := client.LookupTablets(ctx, req)
if err != nil {
    var transient = isTopoTimeout(err) // inspect wrapped FindTablets(cluster = ...) cause
    if transient {
        select {
        case <-time.After(backoff):
            tablets, err = client.LookupTablets(ctx, req)
        case <-ctx.Done():
            return ctx.Err()
        }
    }
    if err != nil { return err }
}

Prevention

When it happens

Trigger: LookupTablets/related calls with an alias filter where the topo RPC for a specific cluster fails (topo server unreachable, no tablets matching the alias are returned-with-error, topo read timeout).

Common situations: VTAdmin cannot reach the topo server (etcd/zk) for one cluster; wrong topo flags for that cluster; network partition or cell's topo is down; tablet alias typo causing a strict lookup error.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/65249dc3d6712a03. Report an issue: GitHub.