{"record":{"id":"49ed97f07fb7011f","repo":"t8y2/dbx","slug":"invalid-hive-sockettimeout-q-expected-seconds-49ed97","errorCode":null,"errorMessage":"invalid Hive socketTimeout %q: expected seconds","messagePattern":"invalid Hive socketTimeout %q: expected seconds","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/config.go","lineNumber":595,"sourceCode":"\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)\n\t\t}\n\t\tconfig.FetchSize = parsed\n\t}\n\tif value := parameter(values, \"sockettimeout\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 64)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Hive socketTimeout %q: expected seconds\", value)\n\t\t}\n\t\tif parsed > 0 {\n\t\t\tconfig.SocketTimeout = time.Duration(parsed) * time.Second\n\t\t}\n\t}\n\tif value := parameter(values, \"thrift.client.max.message.size\"); value != \"\" {\n\t\tparsed, err := strconv.ParseInt(value, 10, 32)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"invalid Hive thrift.client.max.message.size %q: expected bytes\", value)\n\t\t}\n\t\tif parsed > 0 {\n\t\t\tconfig.MaxMessageSize = int32(parsed)\n\t\t}\n\t}\n\tif value := parameter(values, \"retries\"); value != \"\" {\n\t\tparsed, err := strconv.Atoi(value)\n\t\tif err == nil && parsed > 0 {\n\t\t\tconfig.Retries = parsed","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/config.go#L577-L613","documentation":"This error means the 'sockettimeout' connection parameter could not be parsed as an integer number of seconds. The Hive driver expects socketTimeout to be a plain integer (e.g. '30'), which it converts to a time.Duration in seconds; any non-numeric or malformed value causes the config parser to reject it. It is thrown during connection-string/DNS parsing in config.go before any network connection is attempted.","triggerScenarios":"Passing sockettimeout=30s, sockettimeout=30 seconds, sockettimeout=\"30,000\", or any non-integer value in the Hive DSN / parameter map to the driver's config parser.","commonSituations":"Copy-pasting a timeout with a unit suffix (Go duration style like '30s' or '500ms') from another driver; locale-formatted numbers with thousands separators; leaving a placeholder value like 'sockettimeout=<seconds>' in a config template.","solutions":["Remove the unit suffix and pass bare seconds as an integer, e.g. sockettimeout=30","Validate the value with strconv.ParseInt before building the DSN","Remove the sockettimeout parameter entirely to fall back to the driver default"],"exampleFix":"// before\ndsn := \"hive://user@host:10000/db?sockettimeout=30s\"\n// after\ndsn := \"hive://user@host:10000/db?sockettimeout=30\"","handlingStrategy":"validation","validationCode":"func validSocketTimeout(v string) bool {\n\t_, err := strconv.ParseInt(v, 10, 64)\n\treturn err == nil\n}\n// use: if p := params[\"sockettimeout\"]; p != \"\" && !validSocketTimeout(p) { /* fix before connecting */ }","typeGuard":null,"tryCatchPattern":"if _, err := driver.Open(dsn); err != nil {\n\tvar cerr *ConfigError\n\tif errors.As(err, &cerr) { return fmt.Errorf(\"bad DSN param: %w\", err) }\n\treturn err\n}","preventionTips":["Pass sockettimeout as bare integer seconds, never with unit suffixes","Keep timeouts numeric in config files; avoid templated placeholders","Unit-test DSN construction with all timeout parameters"],"tags":["hive","config-parsing","connection-string"],"backgroundTag":"invalid-connection-string-parameter","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}