t8y2/dbx · error
invalid Hive browserResponsePort %q: expected 0-65535
Error message
invalid Hive browserResponsePort %q: expected 0-65535
What it means
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.
Source
Thrown at agents/drivers/argo-go/config.go:567
if hasParameter(values, "ssl") {
config.TLSExplicit = true
}
config.ZooKeeperAuthScheme = parameter(values, "zookeeperauthscheme")
config.ZooKeeperAuth = parameter(values, "zookeeperauth")
config.HTTPHeaders = prefixedParameters(values, "http.header.")
config.HTTPCookies = prefixedParameters(values, "http.cookie.")
config.RequestTracking = parameterBool(values, "requesttrack")
if value, exists := firstParameter(values, "cookieauth"); exists {
config.CookieAuth = !strings.EqualFold(value, "false")
}
config.CookieName = firstNonEmpty(parameter(values, "cookiename"), defaultCookieName)
config.JWT = firstNonEmpty(parameter(values, "jwt"), os.Getenv("JWT"))
config.BrowserToken = firstNonEmpty(parameter(values, "browsertoken"), parameter(values, "token"))
config.BrowserClientID = parameter(values, "browserclientidentifier")
if value := parameter(values, "browserresponseport"); value != "" {
parsed, err := strconv.Atoi(value)
if err != nil || parsed < 0 || parsed > 65535 {
return fmt.Errorf("invalid Hive browserResponsePort %q: expected 0-65535", value)
}
config.BrowserResponsePort = parsed
}
if value := parameter(values, "browserresponsetimeout"); value != "" {
parsed, err := strconv.ParseInt(value, 10, 64)
if err != nil || parsed <= 0 {
return fmt.Errorf("invalid Hive browserResponseTimeout %q: expected positive seconds", value)
}
config.BrowserResponseTimeout = time.Duration(parsed) * time.Second
}
config.BrowserDisableSSLCheck = parameterBool(values, "browserdisablesslcheck")
if strings.EqualFold(config.Auth, "JWT") && config.JWT == "" {
return errors.New("Hive JWT authentication requires jwt or the JWT environment variable")
}
if value := parameter(values, "fetchsize"); value != "" {
parsed, err := strconv.Atoi(value)
if err != nil || parsed <= 0 {
return fmt.Errorf("invalid Hive fetchSize %q: expected a positive integer", value)View on GitHub (pinned to c0390bff16)
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
Example fix
// before jdbc:hive2://host:10000/default;browserResponsePort=99999 // after jdbc:hive2://host:10000/default;browserResponsePort=8080
Defensive patterns
Strategy: validation
Validate before calling
if v := params.Get("browserresponseport"); v != "" {
n, err := strconv.Atoi(v)
if err != nil || n < 0 || n > 65535 {
return fmt.Errorf("browserresponseport %q must be an integer 0-65535", v)
}
} Type guard
func validBrowserResponsePort(v string) bool {
n, err := strconv.Atoi(v)
return err == nil && n >= 0 && n <= 65535
} Try / catch
if err := applyHiveParameters(cfg, raw); err != nil {
if strings.Contains(err.Error(), "browserResponsePort") {
return fmt.Errorf("set browserResponsePort to 0-65535: %w", err)
}
return err
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Confusing the browser response port with the timeout (milliseconds vs port), typos, or setting it to 65536+ from copy-paste of other tooling defaults.
Related errors
- invalid Hive browserResponsePort %q: expected 0-65535
- invalid Hive port: %w
- invalid Hive endpoint %q: %w
- invalid Hive endpoint %q
- invalid Hive browserResponseTimeout %q: expected positive se
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/10da8d87defe032f.
Report an issue: GitHub.