t8y2/dbx · error
Hive endpoint is empty
Error message
Hive endpoint is empty
What it means
parseEndpoint validates each endpoint string: after trimming whitespace it must be non-empty. An empty value cannot be split into host/port, so the driver returns this error immediately. It usually surfaces when an endpoint list contains blank entries.
Source
Thrown at agents/drivers/argo-go/config.go:388
}
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 from the endpoints/hosts list before parsing
- Set the host value in the parameter or environment variable that feeds parseEndpoint
- Filter/split host lists carefully (e.g. strings.Fields or a filtering split on ',')
Example fix
// before
hosts := strings.Split(env_hosts, ",") // may contain ""
// after
var hosts []string
for _, h := range strings.Split(env_hosts, ",") {
if strings.TrimSpace(h) != "" { hosts = append(hosts, h) }
} Defensive patterns
Strategy: validation
Validate before calling
if strings.TrimSpace(endpoint) == "" {
return errors.New("refusing to parse empty endpoint")
} Try / catch
ep, err := parseEndpoint(value, defaultPort)
if err != nil {
return fmt.Errorf("endpoint %q invalid: %w", value, err)
} Prevention
- Filter empty strings after splitting host lists on commas
- Trim host env vars before use
- Never build endpoint lists via naive string concatenation
When it happens
Trigger: Passing "" or a whitespace-only string to parseEndpoint (directly or via a hosts/endpoints parameter that contains empty items, e.g. 'host1:10000,,host2' or a trailing comma).
Common situations: Environment variable with a trailing/leading comma producing an empty split item; config file with an empty hosts field; splitting a host list on the wrong delimiter.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- Hive host is required
- Hive JWT authentication requires jwt or the JWT environment
- Hive delegation token authentication requires delegationToke
- Hive connection string must start with jdbc:hive2:// or hive
- token is empty
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/766604f07b99323d.
Report an issue: GitHub.