{"record":{"id":"3a859873a01e4bd0","repo":"t8y2/dbx","slug":"zookeeper-sasl-round-d-w-3a8598","errorCode":null,"errorMessage":"ZooKeeper SASL round %d: %w","messagePattern":"ZooKeeper SASL round (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/zookeeper_protocol.go","lineNumber":211,"sourceCode":"func (client *protocolZooKeeperClient) authenticateSASL(saslClient zooKeeperSASLClient) error {\n\tif saslClient == nil {\n\t\treturn errors.New(\"ZooKeeper SASL client is nil\")\n\t}\n\tdefer saslClient.Dispose()\n\ttoken, err := saslClient.Start()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"start ZooKeeper GSSAPI negotiation: %w\", err)\n\t}\n\tfor round := 0; round < zooKeeperMaxSASLRounds; round++ {\n\t\tresponse, requestErr := client.request(zooKeeperOpSASL, func(encoder *zooKeeperEncoder) {\n\t\t\tif token == nil {\n\t\t\t\tencoder.bytes([]byte{})\n\t\t\t\treturn\n\t\t\t}\n\t\t\tencoder.bytes(token)\n\t\t})\n\t\tif requestErr != nil {\n\t\t\treturn fmt.Errorf(\"ZooKeeper SASL round %d: %w\", round+1, requestErr)\n\t\t}\n\t\tdecoder := newZooKeeperDecoder(response)\n\t\tchallenge, decodeErr := decoder.bytes()\n\t\tif decodeErr != nil {\n\t\t\treturn fmt.Errorf(\"decode ZooKeeper SASL round %d: %w\", round+1, decodeErr)\n\t\t}\n\t\tif saslClient.Complete() {\n\t\t\tif len(challenge) != 0 {\n\t\t\t\treturn errors.New(\"ZooKeeper sent an unexpected token after GSSAPI completion\")\n\t\t\t}\n\t\t\treturn nil\n\t\t}\n\t\ttoken, err = saslClient.Step(challenge)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"continue ZooKeeper GSSAPI negotiation at round %d: %w\", round+1, err)\n\t\t}\n\t}\n\treturn fmt.Errorf(\"ZooKeeper GSSAPI negotiation exceeded %d rounds\", zooKeeperMaxSASLRounds)","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/zookeeper_protocol.go#L193-L229","documentation":"Returned by protocolZooKeeperClient.authenticateSASL when sending a SASL request frame to ZooKeeper fails at round N (zooKeeperOpSASL request). This is the transport-level write/read of the negotiation round; the wrapped error carries the I/O cause (closed socket, timeout) after GSSAPI started successfully.","triggerScenarios":"Thrown at agents/drivers/hive-go/zookeeper_protocol.go:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check ZooKeeper session liveness — the connection may have been dropped mid-negotiation","Increase the connect/session timeout if negotiation rounds are slow","Inspect the wrapped error for network-level causes and retry the connection"],"exampleFix":null,"handlingStrategy":"try-catch","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"}