{"record":{"id":"23764d55f3bacbbe","repo":"t8y2/dbx","slug":"hive-host-is-required-23764d","errorCode":null,"errorMessage":"Hive host is required","messagePattern":"Hive host is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/config.go","lineNumber":254,"sourceCode":"\t\t\t\treturn connectionConfig{}, endpointErr\n\t\t\t}\n\t\t\tconfig.Endpoints = append(config.Endpoints, parsedEndpoint)\n\t\t}\n\t} else {\n\t\tconfig.Endpoints = parsed.endpoints\n\t}\n\tapplyOpenSessionVariables(&config, values, hiveConfs, hiveVars)\n\tif err := applyDelegationToken(&config, values); err != nil {\n\t\treturn connectionConfig{}, err\n\t}\n\tapplyKerberosJavaOptions(&config.Kerberos, params.AgentJavaOptions)\n\tapplyZooKeeperKerberosJavaOptions(&config.ZooKeeperKerberos, params.AgentJavaOptions)\n\tapplyKerberosEnvironment(&config.Kerberos)\n\tif err := finalizeKerberosConfig(&config); err != nil {\n\t\treturn connectionConfig{}, err\n\t}\n\tif len(config.Endpoints) == 0 {\n\t\treturn connectionConfig{}, errors.New(\"Hive host is required\")\n\t}\n\n\ttlsConfig, err := buildTLSConfig(params, values, config.Endpoints[0].Host)\n\tif err != nil {\n\t\treturn connectionConfig{}, err\n\t}\n\tconfig.TLSConfig = tlsConfig\n\tzooKeeperTLSConfig, err := buildZooKeeperTLSConfig(values)\n\tif err != nil {\n\t\treturn connectionConfig{}, err\n\t}\n\tconfig.ZooKeeperTLSConfig = zooKeeperTLSConfig\n\treturn config, nil\n}\n\nfunc isZooKeeperDiscovery(mode string) bool {\n\treturn strings.EqualFold(mode, \"zookeeper\") || strings.EqualFold(mode, \"zookeeperha\")\n}","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/config.go#L236-L272","documentation":"The Hive connection builder requires at least one server endpoint, and none was resolved from the connection string, parameters, or defaults. finalizeKerberosConfig succeeded, but config.Endpoints ended up empty, so there is no host to connect to. This is the driver's 'no host configured' guard.","triggerScenarios":"Calling the open/connect path with a config missing the host/hosts value; passing an empty or whitespace-only 'host' parameter; building connectionConfig programmatically without appending to Endpoints.","commonSituations":"DSN like 'jdbc:hive2://' with nothing after it, environment-driven configs where the HOST env var is unset, copy-pasted config structs with the host field left blank.","solutions":["Set the host in the connection string (e.g. jdbc:hive2://hivehost:10000/default) or the host parameter.","Verify the environment variable or config file supplying the host is populated in the runtime environment.","When constructing the config in code, append at least one endpoint with host (and port, or rely on the default port)."],"exampleFix":"// before\nurl := \"jdbc:hive2:///default\"\n// after\nurl := \"jdbc:hive2://hive01.example.com:10000/default\"","handlingStrategy":"validation","validationCode":"func requireHiveHost(cfg map[string]string) error {\n    if strings.TrimSpace(cfg[\"host\"]) == \"\" {\n        return errors.New(\"hive host must be set\")\n    }\n    return nil\n}","typeGuard":"func hasEndpoint(cfg *connectionConfig) bool { return len(cfg.Endpoints) > 0 }","tryCatchPattern":"cfg, err := buildConfig(params)\nif err != nil && strings.Contains(err.Error(), \"Hive host is required\") {\n    return fmt.Errorf(\"config error: supply host via DSN or host param: %w\", err)\n}","preventionTips":["Always include host:port in the jdbc:hive2:// DSN","Check env/config in startup health checks before connecting","Default the host from a config constant for each environment"],"tags":["hive","configuration","connection"],"backgroundTag":"missing-host-config","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"}