vitessio/vitess · error

there is no vitess cluster named %s

Error message

there is no vitess cluster named %s

What it means

For the `Show` sub-command of external vitess clusters, GetExternalVitessCluster returned nil (not found) with no error, so the command reports that no cluster with that name exists in the topo. External cluster names are stored in the topo's external cluster map.

Source

Thrown at go/vt/vtctl/vtctl.go:3885

		return nil
	}
	if subFlags.NArg() != 1 {
		return errors.New("cluster name needs to be provided")
	}

	clusterName := subFlags.Arg(0)
	switch *clusterType {
	case "vitess":
		switch {
		case *unmount:
			return wr.UnmountExternalVitessCluster(ctx, clusterName)
		case *show:
			vci, err := wr.TopoServer().GetExternalVitessCluster(ctx, clusterName)
			if err != nil {
				return err
			}
			if vci == nil {
				return fmt.Errorf("there is no vitess cluster named %s", clusterName)
			}
			data, err := json.Marshal(vci)
			if err != nil {
				return err
			}
			wr.Logger().Printf("%s\n", string(data))
			return nil
		default:
			return wr.MountExternalVitessCluster(ctx, clusterName, *topoType, *topoServer, *topoRoot)
		}
	case "mysql":
		return errors.New("mysql cluster type not yet supported")
	default:
		return errors.New("cluster type can be only one of vitess or mysql")
	}
}

func commandGenerateShardRanges(ctx context.Context, wr *wrangler.Wrangler, subFlags *pflag.FlagSet, args []string) error {

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. List existing clusters to check the name (e.g. `ExternalCluster` list path in vtctldclient)
  2. Create/point the cluster first: `vtctldclient ExternalCluster Add <name> <topo-type> <server>` then Set
  3. Verify you are using the correct topo server before retrying

Example fix

// before
vtctldclient ExternalCluster show remote-ks   # not registered
// after
vtctldclient ExternalCluster Add remote-ks etcd2 remote-topo:2379
vtctldclient ExternalCluster show remote-ks
Defensive patterns

Strategy: fallback

Validate before calling

clusters, err := wr.TopoServer().GetExternalVitessClusters(ctx)
// check clusterName is present in clusters before show/move

Try / catch

vci, err := wr.TopoServer().GetExternalVitessCluster(ctx, name)
if err != nil { return err }
if vci == nil {
	return fmt.Errorf("cluster %s not registered; run ExternalCluster Add first", name)
}

Prevention

When it happens

Trigger: Running `vtctldclient <ExternalCluster?> show <clusterName>` where the cluster was never created or was deleted (GetExternalVitessCluster returns nil, nil).

Common situations: Typo in external cluster name; cluster created in a different topo environment; forgot to run `ExternalCluster Add`/`ExternalCluster Set` before show/move operations; nil result after removing clusters during cleanup.

Related errors


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