{"record":{"id":"e9fa79ac5e5aa650","repo":"t8y2/dbx","slug":"send-zookeeper-connect-request-w-e9fa79","errorCode":null,"errorMessage":"send ZooKeeper connect request: %w","messagePattern":"send ZooKeeper connect request: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/zookeeper_protocol.go","lineNumber":156,"sourceCode":"\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}\n\trequest := &zooKeeperEncoder{}\n\trequest.int32(zooKeeperProtocolVersion)\n\trequest.int64(0)\n\trequest.int32(zooKeeperTimeoutMillis(timeout))\n\trequest.int64(0)\n\trequest.bytes(make([]byte, 16))\n\tif err := client.writeFrame(request.data()); err != nil {\n\t\treturn nil, fmt.Errorf(\"send ZooKeeper connect request: %w\", err)\n\t}\n\tresponse, err := client.readFrame()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"read ZooKeeper connect response: %w\", err)\n\t}\n\tdecoder := newZooKeeperDecoder(response)\n\tif _, err := decoder.int32(); err != nil {\n\t\treturn nil, fmt.Errorf(\"decode ZooKeeper protocol version: %w\", err)\n\t}\n\tif _, err := decoder.int32(); err != nil {\n\t\treturn nil, fmt.Errorf(\"decode ZooKeeper session timeout: %w\", err)\n\t}\n\tsessionID, err := decoder.int64()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"decode ZooKeeper session ID: %w\", err)\n\t}\n\tif _, err := decoder.bytes(); err != nil {\n\t\treturn nil, fmt.Errorf(\"decode ZooKeeper session password: %w\", err)","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/zookeeper_protocol.go#L138-L174","documentation":"Returned by newProtocolZooKeeperClient when the initial ZooKeeper connection-request frame (protocol version, timeout, session id 0, password) could not be written to the socket. This is an I/O-level failure on a freshly dialed connection — closed/reset socket or write timeout — during the raw WireProtocol handshake.","triggerScenarios":"Thrown at agents/drivers/hive-go/zookeeper_protocol.go:156 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check ZooKeeper reachability and firewall rules from the agent host","Confirm the ZooKeeper server did not drop the connection immediately (four-letter command stat/srvr)","Retry the connection; transient resets during ensemble leader election can cause this"],"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"}