{"record":{"id":"be5028e1f9fdeb1d","repo":"t8y2/dbx","slug":"resolve-kerberos-server-name-for-cassandra-host-s","errorCode":null,"errorMessage":"resolve Kerberos server name for Cassandra host %s; configure kerberosservername explicitly","messagePattern":"resolve Kerberos server name for Cassandra host (.+?); configure kerberosservername explicitly","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/kerberos.go","lineNumber":439,"sourceCode":"func kerberosServerName(config kerberosConfig, host *gocql.HostInfo) (string, error) {\n\tif config.serverName != \"\" {\n\t\treturn strings.TrimSuffix(strings.TrimSpace(config.serverName), \".\"), nil\n\t}\n\tif host == nil {\n\t\treturn \"\", fmt.Errorf(\"resolve Kerberos server name: Cassandra host is unavailable\")\n\t}\n\taddress := host.ConnectAddress()\n\tif address != nil {\n\t\tnames, err := net.LookupAddr(address.String())\n\t\tif err == nil && len(names) > 0 {\n\t\t\treturn strings.TrimSuffix(strings.TrimSpace(names[0]), \".\"), nil\n\t\t}\n\t}\n\thostname, _, err := net.SplitHostPort(host.HostnameAndPort())\n\tif err == nil && hostname != \"\" && net.ParseIP(hostname) == nil {\n\t\treturn strings.TrimSuffix(hostname, \".\"), nil\n\t}\n\treturn \"\", fmt.Errorf(\"resolve Kerberos server name for Cassandra host %s; configure kerberosservername explicitly\", host.ConnectAddressAndPort())\n}\n\nfunc (config *kerberosConfig) applyJavaSystemProperties() {\n\tif config.jaasConfigPath == \"\" {\n\t\tconfig.jaasConfigPath = javaSystemProperty(\"java.security.auth.login.config\")\n\t}\n\tif config.configPath == \"\" {\n\t\tconfig.configPath = javaSystemProperty(\"java.security.krb5.conf\")\n\t}\n}\n\nfunc (config *kerberosConfig) applyKerberosConfigEnvironment() {\n\tif config.configPath == \"\" {\n\t\tconfig.configPath = os.Getenv(\"KRB5_CONFIG\")\n\t}\n}\n\nfunc (config *kerberosConfig) applyJAASConfig(path string) error {","sourceCodeStart":421,"sourceCodeEnd":457,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/kerberos.go#L421-L457","documentation":"Returned by kerberosServerName when the SPN host could not be derived for the given Cassandra host: reverse DNS (LookupAddr) and hostname extraction both failed, and no kerberosservername override is set. The service principal name for the KDC request cannot be formed, so Kerberos auth setup fails; the message names the host and suggests configuring kerberosservername explicitly.","triggerScenarios":"Thrown at agents/drivers/cassandra-go/kerberos.go:439 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set kerberosservername in the connection config to the broker's FQDN matching its Kerberos principal","Fix DNS so the Cassandra host's IP reverse-resolves (PTR record) or its reported hostname is parseable as host:port"],"exampleFix":null,"handlingStrategy":"fallback","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-14T00:17:10.932Z"}