t8y2/dbx · warning
unsupported HiveServer2 ZooKeeper registration %q
Error message
unsupported HiveServer2 ZooKeeper registration %q
What it means
parseHiveServerRegistration tries several encodings for a HiveServer2 znode — JSON payload, Hive parameters containing serverUri/hiveserver2Uri/server_uri, published config maps, and a bare host:port — for both the node data and the child name. If none yields a valid endpoint, it reports the child name as an unsupported registration format.
Source
Thrown at agents/drivers/hive-go/discovery.go:243
return value, nil
}
parameters := parseHiveParameters(candidate)
for _, key := range []string{"serveruri", "hiveserver2uri", "server_uri"} {
if raw := parameter(parameters, key); raw != "" {
return parseRegisteredEndpoint(raw)
}
}
if value, err := endpointFromPublishedHiveConfig(parameters); err == nil {
return value, nil
}
if strings.Contains(candidate, "=") {
continue
}
if value, err := parseRegisteredEndpoint(candidate); err == nil {
return value, nil
}
}
return endpoint{}, fmt.Errorf("unsupported HiveServer2 ZooKeeper registration %q", child)
}
func endpointFromRegistrationJSON(value string) (endpoint, error) {
var object map[string]any
if json.Unmarshal([]byte(value), &object) != nil {
return endpoint{}, errors.New("not JSON")
}
for _, key := range []string{"serverUri", "server_uri", "hiveServer2Uri", "uri"} {
if raw, ok := object[key].(string); ok && strings.TrimSpace(raw) != "" {
return parseRegisteredEndpoint(raw)
}
}
if serviceRecordEndpoint, ok := endpointFromServiceRecord(object); ok {
return serviceRecordEndpoint, nil
}
host, _ := object["host"].(string)
if host == "" {
host, _ = object["hostname"].(string)View on GitHub (pinned to c0390bff16)
Solutions
- Inspect the failing child (its name is in the message) via zkCli get and confirm what published it.
- Remove unrelated znodes from the discovery namespace or move HiveServer2 registrations to a dedicated namespace.
- Upgrade the driver to a version supporting your HiveServer2's registration format, or reconfigure the server to publish a supported key (serverUri / hiveserver2Uri / server_uri).
- Note this is non-fatal per node: the error is recorded into nodeFailures and other nodes can still be used; fix it only if it makes the namespace unusable.
Example fix
// before (manual znode with free-form text) zkCli create /hiveserver2/extra "some text" // after (parseable registration) zkCli create /hiveserver2/extra "serverUri=10.0.0.5:10000;version=3.1"
Defensive patterns
Strategy: validation
Validate before calling
// Validate a registration payload resembles a known format before relying on it
payload := strings.TrimSpace(string(data))
valid := strings.Contains(payload, "serverUri") || strings.Contains(payload, "server_uri") ||
regexp.MustCompile(`^[\w.:-]+:\d+`).MatchString(payload)
if !valid { log.Printf("skipping non-standard registration %q", child) } Type guard
func looksLikeEndpoint(s string) bool {
host, port, err := net.SplitHostPort(strings.TrimSpace(s))
return err == nil && host != "" && port != ""
} Try / catch
endpoints, err := discovery.Endpoints(ctx, rejected)
if err != nil && strings.Contains(err.Error(), "unsupported HiveServer2 ZooKeeper registration") {
// tolerate unknown children; proceed with whatever else was resolved or fall back
endpoints = staticFallback
} Prevention
- Keep foreign znodes out of the discovery namespace
- Upgrade driver and server in lockstep
- Use the documented published-config keys (serverUri/hiveserver2Uri/server_uri)
- Audit namespaces for manually created test znodes
When it happens
Trigger: Endpoints iterates children of the namespace and one child's data and name match no known registration shape: empty/whitespace-only data with a non-endpoint child name, an unknown JSON schema, or a child name that is not host:port / host:port:protocol.
Common situations: Foreign or administrative znodes sitting inside the namespace; a HiveServer2 version publishing a new service-record format; manual test znodes created with zkCli; older/newer Hive protocol markers the driver doesn't recognize.
Related errors
- no usable HiveServer2 nodes in ZooKeeper namespace %s: %s
- unsupported HiveServer2 ZooKeeper registration %q
- HiveServer2 ZooKeeper namespace not found; tried %s
- no usable HiveServer2 nodes in ZooKeeper namespace %s: %s
- no available HiveServer2 nodes in ZooKeeper namespace %s
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/f63417fcedad9024.
Report an issue: GitHub.