apache/cassandra · error · java.lang.IllegalArgumentException
denylist_initial_load_retry must be a positive integer.
Error message
denylist_initial_load_retry must be a positive integer.
What it means
DatabaseDescriptor.setDenylistInitialLoadRetrySeconds requires a strictly positive number of seconds for denylist_initial_load_retry, the retry interval for the initial deny-list load. Zero or negative ints throw IllegalArgumentException.
Source
Thrown at src/java/org/apache/cassandra/config/DatabaseDescriptor.java:5549
}
public static void setDenylistRefreshSeconds(int seconds)
{
if (seconds <= 0)
throw new IllegalArgumentException("denylist_refresh must be a positive integer.");
conf.denylist_refresh = new DurationSpec.IntSecondsBound(seconds);
}
public static int getDenylistInitialLoadRetrySeconds()
{
return conf.denylist_initial_load_retry.toSeconds();
}
public static void setDenylistInitialLoadRetrySeconds(int seconds)
{
if (seconds <= 0)
throw new IllegalArgumentException("denylist_initial_load_retry must be a positive integer.");
conf.denylist_initial_load_retry = new DurationSpec.IntSecondsBound(seconds);
}
public static ConsistencyLevel getDenylistConsistencyLevel()
{
return conf.denylist_consistency_level;
}
public static void setDenylistConsistencyLevel(ConsistencyLevel cl)
{
conf.denylist_consistency_level = cl;
}
public static int getDenylistMaxKeysPerTable()
{
return conf.denylist_max_keys_per_table;
}View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Pass a positive integer (>= 1 second)
- Remove the invalid value from cassandra.yaml to use the default
- Validate the seconds value at the call site before setting
Example fix
// before DatabaseDescriptor.setDenylistInitialLoadRetrySeconds(0); // after DatabaseDescriptor.setDenylistInitialLoadRetrySeconds(30);
Defensive patterns
Strategy: validation
Validate before calling
if (seconds <= 0) throw new IllegalArgumentException("denylist_initial_load_retry must be a positive integer"); Try / catch
try { DatabaseDescriptor.setDenylistInitialLoadRetrySeconds(v); } catch (IllegalArgumentException e) { logger.error("invalid denylist_initial_load_retry: {}", e.getMessage()); } Prevention
- Validate retry intervals are positive before calling the setter
- Do not use 0 as a no-retry sentinel in cassandra.yaml
- Rely on defaults when unsure of valid bounds
When it happens
Trigger: Calling setDenylistInitialLoadRetrySeconds(0) or negative; e.g. denylist_initial_load_retry: 0 in cassandra.yaml.
Common situations: Hand-edited config with 0 or negative retry interval, or programmatic config code using 0 as a 'no retry' sentinel.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- denylist_refresh must be a positive integer.
- Invalid value of auto_snapshot_ttl: ${conf.auto_snapshot_ttl
- Missing value for commitlog_sync_group_window.
- Missing value for commitlog_sync_period.
- concurrent_reads must be at least 2, but was ${conf.concurre
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/ea03b0de98f82e6d.
Report an issue: GitHub.