{"record":{"id":"5f173ebe147238a4","repo":"vitessio/vitess","slug":"cannot-find-health-for-s","errorCode":null,"errorMessage":"cannot find health for: %s","messagePattern":"cannot find health for: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"go/vt/vtgate/api.go","lineNumber":143,"sourceCode":"\t\t\t\t\tif tabletCacheStatus.Target.Keyspace == value {\n\t\t\t\t\t\tfilteredStatus = append(filteredStatus, tabletCacheStatus)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn filteredStatus, nil\n\t\t\t}\n\t\tcase \"tablet\":\n\t\t\t{\n\t\t\t\t// Return a _specific tablet_\n\t\t\t\tfor _, tabletCacheStatus := range cacheStatus {\n\t\t\t\t\tfor _, tabletStats := range tabletCacheStatus.TabletsStats {\n\t\t\t\t\t\tif tabletStats.Tablet.MysqlHostname == value {\n\t\t\t\t\t\t\treturn tabletStats, nil\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn nil, fmt.Errorf(\"cannot find health for: %s\", itemPath)\n\t})\n}\n","sourceCodeStart":125,"sourceCodeEnd":146,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtgate/api.go#L125-L146","documentation":"After filtering the health-check cache by cell/keyspace/tablet, if no matching tablet health entry is found the handler returns `cannot find health for: <itemPath>`. It means the requested scope matched zero tablets in the health cache, not that the request was malformed.","triggerScenarios":"Requesting health status for a cell, keyspace, or tablet hostname that has no entries in the vtgate health-check cache (tablet not serving, wrong cell/keyspace name, or tablet never registered).","commonSituations":"Typo in cell or tablet hostname; vtgate hasn't discovered the tablet yet; tablet decommissioned or keyspace absent; monitoring dashboards pointing at removed cells.","solutions":["Verify the cell/keyspace/tablet identifier exists (check with vtctldclient).","Ensure vtgate has discovered the tablet (check tablet's health registration).","Wait for discovery/restart vtgate if the cache is stale."],"exampleFix":"// before\ncurl /api/health/tablet/wrong-host\n// after\ncurl /api/health/tablet/zone1-0000000100","handlingStrategy":"retry","validationCode":"// Confirm the tablet/cell exists before querying health\nalias := vtctldclient.GetTablet(host) // errors if unknown\nif alias == nil { return fmt.Errorf(\"tablet %s not registered\", host) }","typeGuard":null,"tryCatchPattern":"if strings.Contains(respBody, \"cannot find health for\") {\n    time.Sleep(2 * time.Second) // allow discovery\n    // re-check identifiers; then give up with a clear error\n}","preventionTips":["Cross-check cell/keyspace/tablet names with vtctldclient first.","Allow vtgate time to discover newly started tablets.","Update dashboards when tablets are decommissioned."],"tags":["vtgate","health-check","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}