t8y2/dbx · error
invalid useticketcache option: %w
Error message
invalid useticketcache option: %w
What it means
The 'useticketcache' (or 'kerberosuseticketcache') URL parameter enables Kerberos ticket-cache based auth and must be a strconv.ParseBool-valid boolean. Invalid values produce this wrapped error and stop config parsing.
Source
Thrown at agents/drivers/cassandra-go/config.go:334
case "kerberosqop", "saslqop":
config.kerberos.qop = value
case "kerberosdisablepafxfast", "disablepafxfast":
disabled, err := strconv.ParseBool(value)
if err != nil {
return fmt.Errorf("invalid disablepafxfast option: %w", err)
}
config.kerberos.disablePAFXFAST = disabled
case "kerberosusekeytab", "usekeytab":
enabled, err := strconv.ParseBool(value)
if err != nil {
return fmt.Errorf("invalid usekeytab option: %w", err)
}
config.kerberos.useKeytab = enabled
config.kerberos.useKeytabSet = true
case "kerberosuseticketcache", "useticketcache":
enabled, err := strconv.ParseBool(value)
if err != nil {
return fmt.Errorf("invalid useticketcache option: %w", err)
}
config.kerberos.useTicketCache = enabled
config.kerberos.useTicketCacheSet = true
case "compliancemode":
// JDBC compliance modes only alter java.sql behavior. The native DBX
// JSON-RPC contract already defines statement and transaction behavior.
default:
return fmt.Errorf("unsupported Cassandra URL parameter: %s", rawKey)
}
}
return nil
}
func (config cassandraConfig) clusterConfig(keyspace string) (*gocql.ClusterConfig, error) {
var cluster *gocql.ClusterConfig
var err error
if config.secureConnectBundle != "" {
cluster, err = gocqlastra.NewClusterFromBundle(View on GitHub (pinned to c0390bff16)
Solutions
- Use true/false (or 1/0, t/f) for useticketcache
- Remove the parameter if the default is desired
- Ensure env substitution in the DSN actually produces a boolean literal
Example fix
// before
cassandra://127.0.0.1/myks?useticketcache=${KRB_FLAG}
// after (with KRB_FLAG=1)
cassandra://127.0.0.1/myks?useticketcache=true Defensive patterns
Strategy: validation
Validate before calling
if v := q.Get("useticketcache"); v != "" {
if _, err := strconv.ParseBool(v); err != nil {
return errors.New("useticketcache must be a boolean")
}
} Try / catch
if err := parseCassandraConfig(dsn); err != nil {
if strings.Contains(err.Error(), "useticketcache option") {
return parseCassandraConfig(defaultBoolParam(dsn, "useticketcache", "true"))
}
return err
} Prevention
- Default env-substituted flags to an explicit boolean when unset
- Use 1/0 in machine-generated URLs
- Validate the full DSN before opening a session
When it happens
Trigger: DSN contains useticketcache=<value> with a non-boolean string, e.g. useticketcache=Y or an empty value from an unset environment variable.
Common situations: Developer laptops using kinit ticket caches copying Java driver examples; CI environments where an env var meant to supply the flag is unset; case-sensitive boolean mistakes.
Related errors
- invalid usekrb5 option: %w
- invalid disablepafxfast option: %w
- invalid usekeytab option: %w
- invalid debug option: %w
- invalid disableinitialhostlookup option: %w
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/92dfbe3a0482aad7.
Report an issue: GitHub.