t8y2/dbx · error
published HiveServer2 configuration has no valid host and po
Error message
published HiveServer2 configuration has no valid host and port
What it means
This error is returned by endpointFromPublishedHiveConfig when a HiveServer2 service entry published in a discovery/registry store does not carry a usable host and TCP port. The driver reads the published configuration parameters (hive.server2.thrift.port, or hive.server2.thrift.http.port for HTTP transport), parses the port with strconv.Atoi, and rejects the endpoint if the host is empty, the port is unparseable, or the port is <= 0. It exists so the driver never attempts a connection to a malformed or incomplete registration.
Source
Thrown at agents/drivers/argo-go/discovery.go:339
target.HTTPPath = strings.TrimPrefix(value("hive.server2.thrift.http.path"), "/")
target.Auth = strings.ToUpper(value("hive.server2.authentication"))
target.Principal = value("hive.server2.authentication.kerberos.principal")
target.SSL = strings.EqualFold(value("hive.server2.use.ssl"), "true")
}
func endpointFromPublishedHiveConfig(parameters map[string]string) (endpoint, error) {
host := firstNonEmpty(
parameter(parameters, "hive.server2.thrift.bind.host"),
parameter(parameters, "host"),
)
transportMode := strings.ToLower(parameter(parameters, "hive.server2.transport.mode"))
portValue := parameter(parameters, "hive.server2.thrift.port")
if transportMode == "http" {
portValue = firstNonEmpty(parameter(parameters, "hive.server2.thrift.http.port"), portValue)
}
port, err := strconv.Atoi(portValue)
if host == "" || err != nil || port <= 0 {
return endpoint{}, errors.New("published HiveServer2 configuration has no valid host and port")
}
return endpoint{
Host: host,
Port: port,
TransportMode: transportMode,
HTTPPath: strings.TrimPrefix(parameter(parameters, "hive.server2.thrift.http.path"), "/"),
Auth: strings.ToUpper(parameter(parameters, "hive.server2.authentication")),
Principal: parameter(parameters, "hive.server2.authentication.kerberos.principal"),
SSL: parameterBool(parameters, "hive.server2.use.ssl"),
}, nil
}
func parseRegisteredEndpoint(value string) (endpoint, error) {
value = strings.TrimSpace(value)
if parsed, err := url.Parse(value); err == nil && parsed.Hostname() != "" {
port := defaultHivePort
if parsed.Port() != "" {
parsedPort, parseErr := strconv.Atoi(parsed.Port())View on GitHub (pinned to c0390bff16)
Solutions
- Inspect the published service parameters and ensure hive.server2.thrift.host (or equivalent host key) and hive.server2.thrift.port are present and numeric
- For HTTP transport mode, set hive.server2.thrift.http.port explicitly (it takes precedence over the thrift port)
- Fix the publishing side so registration only happens with complete host/port values, then re-register the service
- Verify the port value is a plain integer string without whitespace, units, or quotes
Example fix
// before (published config incomplete)
{"hive.server2.thrift.host": "", "hive.server2.thrift.port": ""}
// after
{"hive.server2.thrift.host": "hive.example.com", "hive.server2.thrift.port": "10000"} Defensive patterns
Strategy: validation
Validate before calling
func validPublishedHiveConfig(params map[string]string) bool {
host := params["hive.server2.thrift.host"]
portStr := params["hive.server2.thrift.port"]
if portStr == "" { portStr = params["hive.server2.thrift.http.port"] }
port, err := strconv.Atoi(strings.TrimSpace(portStr))
return host != "" && err == nil && port > 0
} Prevention
- Publish complete host and port parameters at registration time
- Validate published configs before writing them to the discovery store
- Use plain integer port strings without whitespace or units
- Prefer HTTP transport port key when transport mode is http
When it happens
Trigger: Calling parseHiveServerRegistration against a published config where the host key is missing/empty, the port parameter is absent or non-numeric (e.g. empty string, 'none'), or the parsed port is zero or negative.
Common situations: HiveServer2 was registered with a partial/incomplete config map; a custom publication script omitted the thrift port keys; port values stored with whitespace or units ('10000/tcp'); services registered before HiveServer2 finished binding so defaults were never filled in.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- HiveServer2 ZooKeeper namespace not found; tried %s
- Agent runtime thread limits must be positive
- H2 JDBC driver rejected URL: " + buildJdbcUrl(params)
- Custom H2 driver profile requires at least one JDBC JAR path
- Unsupported H2 driver profile: " + profile
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/5ee4a6f652edfb82.
Report an issue: GitHub.