vitessio/vitess · error
no local cells have been created yet
Error message
no local cells have been created yet
What it means
When a tablet-listing request does not specify a cell, the handler falls back to the first cell from the topology (GetCellInfoNames). If the topology contains no cells at all, there is no default to choose and this error is returned. It signals an unconfigured/empty topology rather than a bad request per se.
Source
Thrown at go/vt/vtctld/api.go:345
keyspacePath := getItemPath(r.URL.Path)
parts := strings.SplitN(keyspacePath, "/", 2)
// Request was incorrectly formatted.
if len(parts) != 2 {
return nil, fmt.Errorf("invalid srvkeyspace path: %q expected path: /srv_keyspace/<cell>/<keyspace>", keyspacePath)
}
cell := parts[0]
keyspace := parts[1]
if cell == "local" {
if localCell == "" {
cells, err := ts.GetCellInfoNames(ctx)
if err != nil {
return nil, fmt.Errorf("could not fetch cell info: %v", err)
}
if len(cells) == 0 {
return nil, errors.New("no local cells have been created yet")
}
cell = cells[0]
} else {
cell = localCell
}
}
// If a keyspace is provided then return the specified srvkeyspace.
if keyspace != "" {
srvKeyspace, err := ts.GetSrvKeyspace(ctx, cell, keyspace)
if err != nil {
return nil, fmt.Errorf("can't get server keyspace: %v", err)
}
return srvKeyspace, nil
}
// Else return the srvKeyspace from all keyspaces.
srvKeyspaces := make(map[string]any)View on GitHub (pinned to 01a25a7d17)
Solutions
- Create at least one cell: vtctldclient AddCellInfo --root <root> <cell-name>.
- Verify vtctld's topo flags point at the same topo backend your cells were registered in.
- Explicitly pass a cell (cell=<name> query param) so the fallback is not needed.
- Inspect topo health (vtctldclient GetCellInfoNames or topo tooling) to confirm cells exist.
Example fix
// before curl http://localhost:15000/api/tablets # empty topo -> error // after vtctldclient AddCellInfo --root /vitess/zone1 zone1 curl http://localhost:15000/api/tablets?cell=zone1
Defensive patterns
Strategy: validation
Validate before calling
cells, err := ts.GetCellInfoNames(ctx)
if err != nil { return err }
if len(cells) == 0 {
return fmt.Errorf("topology has no cells; run AddCellInfo before listing tablets")
} Try / catch
resp, err := http.Get(base + "/api/tablets")
if err != nil || strings.Contains(body, "no local cells have been created yet") {
// create a cell first, or pass ?cell=<name>
} Prevention
- Register cells (vtctldclient AddCellInfo) during deployment before other operations.
- Point all components at the same topo backend/namespace.
- Pass an explicit cell parameter when the topology may be empty.
When it happens
Trigger: GET /api/tablets (or equivalent) with no cell parameter or localCell set, while ts.GetCellInfoNames returns an empty list — i.e. no cell infos are registered in the topology.
Common situations: Fresh Vitess deployment where no cells were created yet (vtctldclient AddCellInfo not run); wrong topo server/flags pointing vtctld at an empty etcd/zk namespace; topology wiped or recreated.
Related errors
- cells can only be listed, not retrieved
- parse error
- no shards found in keyspace
- a POST request needs a keyspace in the URL
- a POST request must specify action
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/fbd63dfbc968e39f.
Report an issue: GitHub.