vitessio/vitess · error
invalid connID
Error message
invalid connID
What it means
After parsing the form, the terminate handler converts the connID form value with strconv.ParseInt; a non-numeric or missing connID yields HTTP 500 with the body 'invalid connID'. The connection ID must be a base-10 int64 matching a live MySQL connection on the tablet.
Source
Thrown at go/vt/vttablet/tabletserver/livequeryz.go:104
if err := livequeryzTmpl.Execute(w, rows[i]); err != nil {
log.Error(fmt.Sprintf("livequeryz: couldn't execute template: %v", err))
}
}
}
func livequeryzTerminateHandler(queryLists []*QueryList, w http.ResponseWriter, r *http.Request) {
if err := acl.CheckAccessHTTP(r, acl.ADMIN); err != nil {
acl.SendError(w, err)
return
}
if err := r.ParseForm(); err != nil {
http.Error(w, fmt.Sprintf("cannot parse form: %s", err), http.StatusInternalServerError)
return
}
connID := r.FormValue("connID")
c, err := strconv.ParseInt(connID, 10, 64)
if err != nil {
http.Error(w, "invalid connID", http.StatusInternalServerError)
return
}
for _, ql := range queryLists {
if ql.Terminate(c) {
break
}
}
livequeryzHandler(queryLists, w, r)
}
View on GitHub (pinned to 01a25a7d17)
Solutions
- Pass a valid numeric connID from /livequeryz output: -d 'connID=12345'
- Refresh the live-query list first — the connection may already be gone
- Check for stray characters/whitespace in the ID in your script
Example fix
// before curl -X POST 'http://tablet:15100/livequeryz/terminate' -d 'connID=abc' // after curl -X POST 'http://tablet:15100/livequeryz/terminate' -d 'connID=12345'
Defensive patterns
Strategy: validation
Validate before calling
connID, err := strconv.ParseInt(rawConnID, 10, 64)
if err != nil {
return fmt.Errorf("connID %q must be a base-10 integer", rawConnID)
} Prevention
- Take connID values directly from /livequeryz output programmatically
- Trim whitespace before sending IDs
- Refresh the connection list before terminating — IDs may be stale
When it happens
Trigger: POST /livequeryz/terminate with connID absent, empty, or non-numeric (e.g. connID=abc), so strconv.ParseInt fails.
Common situations: Copy-pasting a connID with whitespace or from the wrong base; terminating from a stale dashboard row; forgetting the connID field entirely.
Related errors
- err.Error() (invalid variable set value)
- Missing varname or value
- %w: parsing %s at position %d
- Method not allowed
- cannot parse form: %s
AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01).
Data as JSON: /api/errors/f724b7c91cbee77e.
Report an issue: GitHub.