t8y2/dbx · error
invalid Hive endpoint %q
Error message
invalid Hive endpoint %q
What it means
Final validation of parseHiveEndpoint: after all parsing branches, the host must be non-blank and the port must be in 1-65535. Unlike the other endpoint errors this one has no wrapped cause because it is a semantic validity check, not a parse failure.
Source
Thrown at agents/drivers/argo-go/config.go:411
host = parsedHost
parsed, parseErr := strconv.Atoi(parsedPort)
if parseErr != nil {
return endpoint{}, fmt.Errorf("invalid Hive endpoint %q: %w", value, parseErr)
}
port = parsed
} else if strings.Count(value, ":") == 1 {
parts := strings.SplitN(value, ":", 2)
parsed, parseErr := strconv.Atoi(parts[1])
if parseErr != nil {
return endpoint{}, fmt.Errorf("invalid Hive endpoint %q: %w", value, parseErr)
}
host = parts[0]
port = parsed
} else if strings.HasPrefix(value, "[") && strings.HasSuffix(value, "]") {
host = strings.Trim(value, "[]")
}
if strings.TrimSpace(host) == "" || port <= 0 || port > 65535 {
return endpoint{}, fmt.Errorf("invalid Hive endpoint %q", value)
}
return endpoint{Host: host, Port: port}, nil
}
func parseHiveParameters(raw string) map[string]string {
return parseHiveAssignments(raw, false)
}
func parseHiveAssignments(raw string, lowercaseKeys bool) map[string]string {
result := map[string]string{}
trimmed := strings.Trim(strings.TrimSpace(raw), "?#&;")
for _, part := range strings.FieldsFunc(trimmed, func(char rune) bool { return char == ';' || char == '&' }) {
part = strings.TrimSpace(part)
if part == "" {
continue
}
key, value, found := strings.Cut(part, "=")
key = strings.TrimSpace(key)View on GitHub (pinned to c0390bff16)
Solutions
- Supply a real hostname and a port in 1-65535
- Remove empty entries/commas from the endpoint list
- Fix port ranges outside 1-65535 (drop 0 unless explicitly allowed elsewhere)
- Add pre-validation in your config loader: host non-empty and 0 < port <= 65535
Example fix
// before endpoint: "host:99999" // after endpoint: "host:10000"
Defensive patterns
Strategy: validation
Validate before calling
func checkEndpoint(v string) error {
h, p, err := net.SplitHostPort(v)
if err != nil { return err }
n, err := strconv.Atoi(p)
if err != nil { return err }
if strings.TrimSpace(h) == "" || n <= 0 || n > 65535 {
return fmt.Errorf("endpoint %q: host required, port 1-65535", v)
}
return nil
} Type guard
func endpointInRange(v string) bool {
h, p, err := net.SplitHostPort(v)
if err != nil { return false }
n, err := strconv.Atoi(p)
return strings.TrimSpace(h) != "" && err == nil && n >= 1 && n <= 65535
} Try / catch
ep, err := parseHiveEndpoint(v)
if err != nil && strings.HasSuffix(err.Error(), "invalid Hive endpoint "+strconv.Quote(v)) {
// semantic failure: blank host or out-of-range port; report to operator
return fmt.Errorf("fix host/port in %q: %w", v, err)
} Prevention
- Strip empty entries from comma-separated endpoint lists
- Never use 0 or negative numbers as placeholder ports
- Trim whitespace around hosts in config loading
- Add a startup assertion that all endpoints pass 1-65535 range checks
When it happens
Trigger: Endpoint value yields empty/whitespace host, a port of 0, a negative port, or a port above 65535 after parsing (e.g. 'host:0', 'host:-1', 'host:99999', or ':' alone).
Common situations: Blank entries in comma-separated endpoint lists (trailing commas), zero used as a placeholder, or computed ports from arithmetic gone wrong.
Related errors
- invalid Hive endpoint %q
- invalid Hive endpoint %q: %w
- invalid Hive browserResponsePort %q: expected 0-65535
- invalid Hive browserResponseTimeout %q: expected positive se
- invalid Hive fetchSize %q: expected a positive integer
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/665b98d57d998827.
Report an issue: GitHub.