t8y2/dbx · error
Hive endpoint is empty
Error message
Hive endpoint is empty
What it means
parseEndpoint is given an empty (after trimming whitespace) endpoint string while building the endpoint list for a Hive connection. The parser refuses to create a zero-value endpoint so connections fail with a clear message instead of dialing an invalid address.
Source
Thrown at agents/drivers/hive-go/config.go:391
}
return result, nil
}
func splitEndpoints(value string) []string {
parts := strings.Split(value, ",")
result := make([]string, 0, len(parts))
for _, part := range parts {
if trimmed := strings.TrimSpace(part); trimmed != "" {
result = append(result, trimmed)
}
}
return result
}
func parseEndpoint(value string, defaultPort int) (endpoint, error) {
value = strings.TrimSpace(value)
if value == "" {
return endpoint{}, errors.New("Hive endpoint is empty")
}
host := value
port := defaultPort
if parsedHost, parsedPort, err := net.SplitHostPort(value); err == nil {
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 = parsedView on GitHub (pinned to c0390bff16)
Solutions
- Remove empty entries and stray commas from the hosts/endpoints list.
- Set a real host for the entry, e.g. hive01.example.com:10000.
- Trim the parameter source so whitespace-only values become empty and are dropped before parsing.
Example fix
// before HIVE_HOSTS="hive01,,hive02" // after HIVE_HOSTS="hive01:10000,hive02:10000"
Defensive patterns
Strategy: validation
Validate before calling
func sanitizeHosts(list string) []string {
var out []string
for _, h := range strings.Split(list, ",") {
if h = strings.TrimSpace(h); h != "" {
out = append(out, h)
}
}
return out
} Prevention
- Never build host lists with naive string concatenation
- Trim and drop empty entries after splitting on commas
- Validate every entry parses as host[:port] before connecting
When it happens
Trigger: A hosts/endpoints list containing an empty entry (e.g. 'host1,,host2' or a trailing comma 'host1,'), a hosts parameter set to only spaces, or splitting behavior that yields empty strings between separators.
Common situations: Environment variables like HIVE_HOSTS="" or with stray commas, config files where users removed a host but left the delimiter, template-generated host lists with unfilled slots.
Related errors
- Hive host is required
- Hive endpoint is empty
- Hive JWT authentication requires jwt or the JWT environment
- Hive delegation token authentication requires delegationToke
- Hive two-way TLS requires sslKeyStore or a client certificat
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/65abab449a2f0166.
Report an issue: GitHub.