t8y2/dbx · warning
JSON registration has no endpoint
Error message
JSON registration has no endpoint
What it means
The ZooKeeper node payload parsed as JSON but none of the recognized endpoint fields (serverUri, server_uri, hiveServer2Uri, uri, or host/port structures) yielded a usable host and positive port, so no endpoint can be constructed. This filters out JSON nodes that are not valid HiveServer2 registrations.
Source
Thrown at agents/drivers/argo-go/discovery.go:273
}
if serviceRecordEndpoint, ok := endpointFromServiceRecord(object); ok {
return serviceRecordEndpoint, nil
}
host, _ := object["host"].(string)
if host == "" {
host, _ = object["hostname"].(string)
}
port := 0
switch value := object["port"].(type) {
case float64:
port = int(value)
case string:
port, _ = strconv.Atoi(value)
}
if host != "" && port > 0 {
return endpoint{Host: host, Port: port}, nil
}
return endpoint{}, errors.New("JSON registration has no endpoint")
}
func endpointFromServiceRecord(object map[string]any) (endpoint, bool) {
internal, _ := object["internal"].([]any)
for _, rawEndpoint := range internal {
published, _ := rawEndpoint.(map[string]any)
if !strings.EqualFold(registrationStringValue(published["api"]), "activeEndpoint") {
continue
}
addresses, _ := published["addresses"].([]any)
for _, rawAddress := range addresses {
address, _ := rawAddress.(map[string]any)
host := registrationStringValue(address["host"])
port, _ := strconv.Atoi(registrationStringValue(address["port"]))
if host != "" && port > 0 {
result := endpoint{Host: host, Port: port}
applyPublishedHiveConfig(&result, object)
return result, trueView on GitHub (pinned to c0390bff16)
Solutions
- Fix the HiveServer2 registration so it includes a valid serverUri (host:port) or host/port fields with port > 0
- Remove unrelated JSON nodes from the discovery znode path or point discovery at the proper namespace
- Confirm hive.server2 port configuration (default 10000) so registrations publish a usable port
Example fix
// before (znode data)
"{"serviceId":"hs2"}"
// after (znode data)
"{"serverUri":"host1.example.com:10000"}" Defensive patterns
Strategy: type-guard
Validate before calling
var rec map[string]any
if json.Unmarshal([]byte(payload), &rec) == nil {
if uri, ok := rec["serverUri"].(string); !ok || strings.TrimSpace(uri) == "" {
// skip: JSON but no endpoint
}
} Type guard
func hasEndpointField(object map[string]any) bool {
for _, k := range []string{"serverUri", "server_uri", "hiveServer2Uri", "uri"} {
if s, ok := object[k].(string); ok && strings.TrimSpace(s) != "" {
return true
}
}
return false
} Try / catch
ep, err := parseHiveServerRegistration(child, data)
if err != nil {
log.Printf("skipping registration %s: %v", child, err) // non-fatal
continue
} Prevention
- Ensure hive.server2 port is configured (non-zero) so registrations are complete
- Keep unrelated JSON writers out of the discovery znode path
- Treat registrations without endpoints as skippable noise, not fatal errors
When it happens
Trigger: endpointFromRegistrationJSON receives valid JSON that either lacks the known URI keys, has an empty/whitespace URI, or a host/port structure where host is empty or port <= 0 (e.g. port 0 or non-numeric).
Common situations: Custom or third-party services writing unrelated JSON into the discovery namespace; Hive service records with missing/misconfigured ports; partially initialized registrations written before the port is known.
Related errors
- Hive discovery returned no endpoints
- not JSON
- not JSON
- JSON registration has no endpoint
- Invalid ${name}: ${error.message}
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/a995e65829167742.
Report an issue: GitHub.