{"record":{"id":"eced341878d858e8","repo":"t8y2/dbx","slug":"decode-zookeeper-session-id-w-eced34","errorCode":null,"errorMessage":"decode ZooKeeper session ID: %w","messagePattern":"decode ZooKeeper session ID: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/zookeeper_protocol.go","lineNumber":171,"sourceCode":"\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)\n\t}\n\tif sessionID == 0 {\n\t\treturn nil, zk.ErrSessionExpired\n\t}\n\treturn client, nil\n}\n\nfunc zooKeeperTimeoutMillis(timeout time.Duration) int32 {\n\tmilliseconds := timeout.Milliseconds()\n\tif milliseconds < 1 {\n\t\treturn 1\n\t}\n\tif milliseconds > math.MaxInt32 {\n\t\treturn math.MaxInt32\n\t}","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/zookeeper_protocol.go#L153-L189","documentation":"Returned by newProtocolZooKeeperClient when the session id (int64) of the connect response cannot be decoded — the response buffer ran out after protocol version and timeout. Indicates a truncated or malformed ZooKeeper handshake reply.","triggerScenarios":"Thrown at agents/drivers/hive-go/zookeeper_protocol.go:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network integrity between agent and ZooKeeper (MTU, proxies)","Confirm the endpoint speaks the ZooKeeper wire protocol","Retry or fail over to another ensemble member"],"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"}