{"record":{"id":"692c2bd84479f2aa","repo":"t8y2/dbx","slug":"parse-zookeeper-tls-address-q-w-692c2b","errorCode":null,"errorMessage":"parse ZooKeeper TLS address %q: %w","messagePattern":"parse ZooKeeper TLS address %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/zookeeper_protocol.go","lineNumber":59,"sourceCode":"var newZooKeeperSASLClient = func(host string, config connectionConfig) (zooKeeperSASLClient, error) {\n\tservice, options := zooKeeperGSSAPIOptions(config)\n\tmechanism, err := gosasl.NewGSSAPIMechanismWithOptions(service, options)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn gosasl.NewSaslClient(host, mechanism), nil\n}\n\nvar dialZooKeeperConnection = func(address string, timeout time.Duration, tlsConfig *tls.Config) (net.Conn, error) {\n\tdialer := &net.Dialer{Timeout: timeout}\n\tif tlsConfig == nil {\n\t\treturn dialer.Dial(\"tcp\", address)\n\t}\n\tconfig := tlsConfig.Clone()\n\tif config.ServerName == \"\" {\n\t\thost, _, err := net.SplitHostPort(address)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"parse ZooKeeper TLS address %q: %w\", address, err)\n\t\t}\n\t\tconfig.ServerName = host\n\t}\n\treturn tls.DialWithDialer(dialer, \"tcp\", address, config)\n}\n\nvar shuffleZooKeeperServers = func(servers []string) {\n\trand.Shuffle(len(servers), func(first, second int) {\n\t\tservers[first], servers[second] = servers[second], servers[first]\n\t})\n}\n\nfunc zooKeeperGSSAPIOptions(config connectionConfig) (string, gosasl.GSSAPIOptions) {\n\tservice := firstNonEmpty(config.ZooKeeperKerberos.Service, \"zookeeper\")\n\toptions := gssapiOptionsFromKerberos(config.Kerberos)\n\toptions.QOP = \"auth\"\n\toptions.AuthorizationID = \"\"\n\toptions.ServiceHost = \"\"","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/zookeeper_protocol.go#L41-L77","documentation":"Returned by newProtocolZooKeeperClient in hive-go when parsing a TLS-secures-the-ZooKeeper-address form fails: the %q address and wrapped error identify which endpoint string could not be interpreted as a TLS address. It surfaces during Kerberos ZooKeeper connection setup when the address list contains a malformed entry.","triggerScenarios":"Thrown at agents/drivers/hive-go/zookeeper_protocol.go:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped parse error for the offending address format","Use plain host:port ZooKeeper addresses and configure TLS via the dedicated TLS options instead of address-embedded schemes","Remove any stray scheme/prefix from the zookeeper address entries"],"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"}