t8y2/dbx · error
%s path is empty
Error message
%s path is empty
What it means
requireRegularFile validates a labeled filesystem path (keytab, ccache, krb5 config) before use. It reports that the configured path string is empty, meaning the corresponding configuration option was never set and no default could be resolved. The driver cannot stat a file without a path, so it fails fast with a clear message.
Source
Thrown at agents/drivers/cassandra-go/kerberos.go:615
}
currentUser, err := user.Current()
if err == nil && currentUser.Uid != "" {
return filepath.Join(os.TempDir(), "krb5cc_"+currentUser.Uid)
}
return ""
}
func firstPathListEntry(value string) string {
entries := filepath.SplitList(value)
if len(entries) == 0 {
return value
}
return entries[0]
}
func requireRegularFile(label, path string) error {
if path == "" {
return fmt.Errorf("%s path is empty", label)
}
info, err := os.Stat(path)
if err != nil {
return fmt.Errorf("read %s %s: %w", label, path, err)
}
if !info.Mode().IsRegular() {
return fmt.Errorf("%s is not a regular file: %s", label, path)
}
return nil
}
func firstNonEmpty(values ...string) string {
for _, value := range values {
if value != "" {
return value
}
}
return ""View on GitHub (pinned to c0390bff16)
Solutions
- Set the relevant configuration option (krb5 config path, keytab path, or ccache path) explicitly in the connect parameters.
- Export the expected environment variable (KRB5_CONFIG, KRB5CCNAME) before starting the process.
- Ensure the credential file exists at the default location (e.g. /etc/krb5.conf) if you rely on defaults.
Example fix
// before
params: {"host":"cassandra.example.com"} // no kerberos config path
// after
params: {"host":"cassandra.example.com", "kerberosconfigpath":"/etc/krb5.conf", "kerberoskeytab":"/etc/cassandra.keytab"} Defensive patterns
Strategy: validation
Validate before calling
if cfg.KerberosConfigPath == "" {
if _, err := os.Stat("/etc/krb5.conf"); err != nil {
return fmt.Errorf("no kerberos config path configured and /etc/krb5.conf missing")
}
} Try / catch
if err != nil && strings.HasSuffix(err.Error(), "path is empty") {
return fmt.Errorf("kerberos options missing in connect params: %w", err)
} Prevention
- Fail at application startup if KRB5_CONFIG/KRB5CCNAME and config options are all unset in Kerberos mode.
- Document required kerberos.* connect params next to the DSN.
- Check container images include a default krb5.conf or pass the path explicitly.
When it happens
Trigger: finalize, selectCCacheCredential, or selectKeytabCredential invokes requireRegularFile with path == "" — e.g. the kerberos config/keytab/ccache option is absent from the connect params and firstNonEmpty found no value among the config path, KRB5CCNAME, or environment fallbacks.
Common situations: Running in a container or minimal image where KRB5CCNAME/KRB5_CONFIG are unset and no default /etc/krb5.conf exists; forgetting to set the kerberos options in the DSN or connect params; a shell variable used in the config that expands to the empty string.
Related errors
- invalid Cassandra JAAS config path: %w
- invalid Kerberos config path: %w
- ZooKeeper Kerberos SASL requires Hive Kerberos credentials
- ZooKeeper server list is empty
- ZooKeeper Kerberos SASL requires Hive Kerberos credentials
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/61671c76098b84f7.
Report an issue: GitHub.