t8y2/dbx · warning

unsupported HiveServer2 ZooKeeper registration %q

Error message

unsupported HiveServer2 ZooKeeper registration %q

What it means

parseHiveServerRegistration could not extract an endpoint from a HiveServer2 registration znode: neither the node data nor the child name was in any supported format (JSON with known keys, service record, key=value params with serveruri/hiveserver2uri/server_uri, or plain host:port). The child name is quoted in the error so the offending payload can be inspected.

Source

Thrown at agents/drivers/argo-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

  1. Inspect the znode: zkCli get /<ns>/<child> — compare against supported formats (JSON serverUri/host keys, service record, host:port, serveruri=...).
  2. Exclude non-HiveServer2 services from the discovery namespace or point the namespace config at the path HiveServer2 actually publishes to.
  3. If HiveServer2 publishes an unrecognized format, upgrade the driver or pre-normalize registrations to a supported JSON schema.
  4. Note this error is non-fatal per node — if other children parse fine, discovery succeeds; only worry when ALL nodes fail (error 572).

Example fix

// znode data: 10.0.0.5;10002  (unsupported)
// fix: publish supported JSON
{"serverUri":"10.0.0.5:10002"}
Defensive patterns

Strategy: type-guard

Validate before calling

// preflight: check whether a znode payload is parseable before relying on discovery
func looksLikeRegistration(data []byte) bool {
    s := strings.TrimSpace(string(data))
    if s == "" { return false }
    if json.Valid([]byte(s)) { return true }
    if strings.Contains(s, "=") { return true }
    _, _, err := net.SplitHostPort(s)
    return err == nil
}

Type guard

func isWellFormedRegistration(child string, data []byte) bool {
    for _, c := range []string{strings.TrimSpace(string(data)), strings.TrimSpace(child)} {
        if c == "" { continue }
        if json.Valid([]byte(c)) { return true }
        if strings.Contains(c, "=") { return true }
        if _, _, err := net.SplitHostPort(c); err == nil { return true }
    }
    return false
}

Try / catch

eps, err := discovery.Endpoints(ctx, nil)
if err != nil && strings.Contains(err.Error(), "unsupported HiveServer2 ZooKeeper registration") {
    log.Warnw("unrecognized registration payload; inspect znode", "hint", err)
    return fallbackEndpoints, nil
}

Prevention

When it happens

Trigger: A child znode under the discovery namespace whose data and name both fail endpointFromRegistrationJSON, parameter-key lookup, endpointFromPublishedHiveConfig, and parseRegisteredEndpoint. Surfaced through Endpoints as part of nodeFailures.

Common situations: Custom or third-party services (non-HiveServer2) registered in the same namespace; unusual Hive versions publishing a proprietary config format; binary or base64-encoded payloads; child names that are not host:port (e.g. GUIDs).

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/d99768a43e3b7ed8. Report an issue: GitHub.