t8y2/dbx · error
list ZooKeeper namespace %s: %w
Error message
list ZooKeeper namespace %s: %w
What it means
This error wraps failures from connection.Children(path) while listing the HiveServer2 namespace znode in ZooKeeper (discovery.go:129). It fires when the listing call returns a non-nil error other than zk.ErrNoNode (which is tolerated and skipped). The path is interpolated into the message to identify which namespace failed.
Source
Thrown at agents/drivers/hive-go/discovery.go:129
}
if discovery.authScheme != "" || discovery.auth != "" {
if discovery.authScheme == "" || discovery.auth == "" {
return nil, errors.New("ZooKeeper auth scheme and credentials must be configured together")
}
if err := connection.AddAuth(discovery.authScheme, []byte(discovery.auth)); err != nil {
return nil, fmt.Errorf("authenticate to ZooKeeper: %w", err)
}
}
resolved := make([]endpoint, 0)
var listedPath string
var nodeFailures []string
for _, path := range discovery.paths() {
children, _, childrenErr := connection.Children(path)
if errors.Is(childrenErr, zk.ErrNoNode) {
continue
}
if childrenErr != nil {
return nil, fmt.Errorf("list ZooKeeper namespace %s: %w", path, childrenErr)
}
listedPath = path
for _, child := range children {
data, _, dataErr := connection.Get(path + "/" + child)
if dataErr != nil {
if errors.Is(dataErr, zk.ErrNoNode) {
continue
}
nodeFailures = append(nodeFailures, fmt.Sprintf("%s/%s: %v", path, child, dataErr))
continue
}
value, parseErr := parseHiveServerRegistration(child, data)
if parseErr == nil {
resolved = append(resolved, value)
} else {
nodeFailures = append(nodeFailures, fmt.Sprintf("%s/%s: %v", path, child, parseErr))
}
}View on GitHub (pinned to c0390bff16)
Solutions
- Check ACLs on the namespace znode and ensure the authenticated user has read access.
- Verify the configured ZooKeeper namespace path (e.g. /hiveserver2) is correct.
- Re-check ZooKeeper ensemble health and session stability.
- Retry the connection; if intermittent, investigate zk session timeouts/network drops.
Example fix
// before (path requires auth not configured) dsn += "&zookeeper=zk1:2181/hiveserver2-secure" // after dsn += "&zookeeper=zk1:2181/hiveserver2-secure&zookeeperauth=digest&zookeeperauthdata=svcuser:svcsecret"
Defensive patterns
Strategy: try-catch
Validate before calling
// ensure auth is configured for ACL-protected namespaces before listing
if strings.Contains(zkNamespace, "secure") && params["zookeeperauth"] == "" {
return errors.New("secure zookeeper namespace requires auth configuration")
}
Try / catch
endpoints, err := discovery.Endpoints(ctx)
if err != nil && strings.Contains(err.Error(), "list ZooKeeper namespace") {
// path is embedded in the message; check ACLs/session, then retry
return retryWithBackoff(ctx, 3, func() error { _, err := discovery.Endpoints(ctx); return err })
}
Prevention
- Grant the discovery user read ACLs on the HiveServer2 namespace znode.
- Verify the namespace/chroot path is correct before deploying.
- Keep zk sessions alive with sane timeouts to avoid mid-list session expiry.
- Log the failing namespace path from the error to speed up ACL debugging.
When it happens
Trigger: During discovery.Endpoints, connection.Children(path) returns an error that is not ErrNoNode: permission denied on the znode (ACLs), connection dropped mid-session, or session expired.
Common situations: HiveServer2 znodes protected by SASL/digest ACLs the client lacks; ZooKeeper session timing out under load; wrong chroot/namespace path in configuration pointing at a restricted znode; zk ensemble flapping.
Related errors
- ZooKeeper session closed because SASL authentication is requ
- ZooKeeper server list is empty
- ZooKeeper Kerberos SASL requires Hive Kerberos credentials
- ZooKeeper connection is nil
- ZooKeeper SASL client is nil
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/9b7d0c9bc7826549.
Report an issue: GitHub.