{"record":{"id":"10da8d87defe032f","repo":"t8y2/dbx","slug":"invalid-hive-browserresponseport-q-expected-0-65","errorCode":null,"errorMessage":"invalid Hive browserResponsePort %q: expected 0-65535","messagePattern":"invalid Hive browserResponsePort %q: expected 0-65535","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/argo-go/config.go","lineNumber":567,"sourceCode":"\tif hasParameter(values, \"ssl\") {\n\t\tconfig.TLSExplicit = true\n\t}\n\tconfig.ZooKeeperAuthScheme = parameter(values, \"zookeeperauthscheme\")\n\tconfig.ZooKeeperAuth = parameter(values, \"zookeeperauth\")\n\tconfig.HTTPHeaders = prefixedParameters(values, \"http.header.\")\n\tconfig.HTTPCookies = prefixedParameters(values, \"http.cookie.\")\n\tconfig.RequestTracking = parameterBool(values, \"requesttrack\")\n\tif value, exists := firstParameter(values, \"cookieauth\"); exists {\n\t\tconfig.CookieAuth = !strings.EqualFold(value, \"false\")\n\t}\n\tconfig.CookieName = firstNonEmpty(parameter(values, \"cookiename\"), defaultCookieName)\n\tconfig.JWT = firstNonEmpty(parameter(values, \"jwt\"), os.Getenv(\"JWT\"))\n\tconfig.BrowserToken = firstNonEmpty(parameter(values, \"browsertoken\"), parameter(values, \"token\"))\n\tconfig.BrowserClientID = parameter(values, \"browserclientidentifier\")\n\tif value := parameter(values, \"browserresponseport\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err != nil || parsed < 0 || parsed > 65535 {\n\t\t\treturn fmt.Errorf(\"invalid Hive browserResponsePort %q: expected 0-65535\", value)\n\t\t}\n\t\tconfig.BrowserResponsePort = parsed\n\t}\n\tif value := parameter(values, \"browserresponsetimeout\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err != nil || parsed <= 0 {\n\t\t\treturn fmt.Errorf(\"invalid Hive browserResponseTimeout %q: expected positive seconds\", value)\n\t\t}\n\t\tconfig.BrowserResponseTimeout = time.Duration(parsed) * time.Second\n\t}\n\tconfig.BrowserDisableSSLCheck = parameterBool(values, \"browserdisablesslcheck\")\n\tif strings.EqualFold(config.Auth, \"JWT\") && config.JWT == \"\" {\n\t\treturn errors.New(\"Hive JWT authentication requires jwt or the JWT environment variable\")\n\t}\n\tif value := parameter(values, \"fetchsize\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err != nil || parsed <= 0 {\n\t\t\treturn fmt.Errorf(\"invalid Hive fetchSize %q: expected a positive integer\", value)","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/argo-go/config.go#L549-L585","documentation":"The browserResponsePort Hive connection parameter must be an integer in 0-65535 because it is used as a TCP port. A value that fails Atoi or falls outside that range aborts configuration parsing with this error.","triggerScenarios":"Passing browserResponsePort= (empty handled separately) a non-numeric or out-of-range value in the connection string/params, e.g. browserresponseport=abc, =70000, or =-1.","commonSituations":"Confusing the browser response port with the timeout (milliseconds vs port), typos, or setting it to 65536+ from copy-paste of other tooling defaults.","solutions":["Set browserresponseport to an integer between 0 and 65535","Remove the parameter to leave the port unset","Check you are not passing a timeout value (seconds/ms) into the port parameter","Pre-validate with strconv.Atoi and range check before building the config"],"exampleFix":"// before\njdbc:hive2://host:10000/default;browserResponsePort=99999\n// after\njdbc:hive2://host:10000/default;browserResponsePort=8080","handlingStrategy":"validation","validationCode":"if v := params.Get(\"browserresponseport\"); v != \"\" {\n    n, err := strconv.Atoi(v)\n    if err != nil || n < 0 || n > 65535 {\n        return fmt.Errorf(\"browserresponseport %q must be an integer 0-65535\", v)\n    }\n}","typeGuard":"func validBrowserResponsePort(v string) bool {\n    n, err := strconv.Atoi(v)\n    return err == nil && n >= 0 && n <= 65535\n}","tryCatchPattern":"if err := applyHiveParameters(cfg, raw); err != nil {\n    if strings.Contains(err.Error(), \"browserResponsePort\") {\n        return fmt.Errorf(\"set browserResponsePort to 0-65535: %w\", err)\n    }\n    return err\n}","preventionTips":["Do not confuse the port with the timeout parameter","Keep browser callback port config in its own clearly named variable","Range-check ports at config load, before driver calls","Document allowed values (0 = let OS pick, 1-65535 explicit) for operators"],"tags":["hive","config","port","validation"],"backgroundTag":"invalid-port","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"}