{"record":{"id":"9f047b47c6953e9c","repo":"t8y2/dbx","slug":"connect-and-authenticate-to-zookeeper-s-9f047b","errorCode":null,"errorMessage":"connect and authenticate to ZooKeeper: %s","messagePattern":"connect and authenticate to ZooKeeper: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/zookeeper_protocol.go","lineNumber":130,"sourceCode":"\t\tclient, err := newProtocolZooKeeperClient(connection, timeout)\n\t\tif err == nil {\n\t\t\tvar saslClient zooKeeperSASLClient\n\t\t\tsaslClient, err = newZooKeeperSASLClient(host, config)\n\t\t\tif err == nil {\n\t\t\t\terr = client.authenticateSASL(saslClient)\n\t\t\t}\n\t\t}\n\t\tif err != nil {\n\t\t\tconnection.Close()\n\t\t\tfailures = append(failures, fmt.Sprintf(\"%s: %v\", address, err))\n\t\t\tcontinue\n\t\t}\n\t\tevents := make(chan zk.Event, 1)\n\t\tevents <- zk.Event{State: zk.StateHasSession, Server: address}\n\t\tclose(events)\n\t\treturn client, events, nil\n\t}\n\treturn nil, nil, fmt.Errorf(\"connect and authenticate to ZooKeeper: %s\", strings.Join(failures, \"; \"))\n}\n\ntype protocolZooKeeperClient struct {\n\tconnection net.Conn\n\ttimeout    time.Duration\n\txid        int32\n\tmutex      sync.Mutex\n\tclosed     bool\n}\n\nfunc newProtocolZooKeeperClient(connection net.Conn, timeout time.Duration) (*protocolZooKeeperClient, error) {\n\tif connection == nil {\n\t\treturn nil, errors.New(\"ZooKeeper connection is nil\")\n\t}\n\tif timeout <= 0 {\n\t\ttimeout = defaultConnectTimeout\n\t}\n\tclient := &protocolZooKeeperClient{connection: connection, timeout: timeout}","sourceCodeStart":112,"sourceCodeEnd":148,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/zookeeper_protocol.go#L112-L148","documentation":"Returned by connectKerberosZooKeeper after every address in the ZooKeeper ensemble list was tried and each failed to connect and complete SASL authentication; the message joins the per-address failures. It means the entire failover loop produced no usable authenticated ZooKeeper connection for HiveServer2 discovery.","triggerScenarios":"Thrown at agents/drivers/hive-go/zookeeper_protocol.go:130 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the per-address failure list to distinguish connect timeouts from SASL auth errors","Verify ZooKeeper hosts/ports and network reachability from the agent","For SASL failures check Kerberos tickets, keytabs, JAAS config, and the ZooKeeper auth configuration on the ensemble","Confirm the ZooKeeper ensemble requires (and permits) the GSSAPI mechanism the agent is using"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}