apache/cassandra · error · IllegalArgumentException
Invalid [ ]. Blocking only accepts 'true' or 'false'.
Error message
Invalid [%s]. Blocking only accepts 'true' or 'false'.
What it means
IllegalArgumentException from EnableAuditLog.execute when the --blocking option is not the literal string 'true' or 'false'. Nodetool options arrive as strings, so the boolean is parsed manually and any other value is rejected before applying audit log settings.
Solutions
- Pass --blocking true or --blocking false exactly (lowercase)
- Omit the flag to keep the current setting
- Fix scripts that pass yes/no or 1/0
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/tools/nodetool/EnableAuditLog.java:80 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/1048879ca10a424a.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/nodetool/EnableAuditLog.java:80
private long maxLogSize = Long.MIN_VALUE;
@Option(paramLabel = "archive_command", names = { "--archive-command" }, description = "Command that will handle archiving rolled audit log files." +
" Format is \"/path/to/script.sh %%path\" where %%path will be replaced with the file to archive" +
" Enable this by setting the audit_logging_options.allow_nodetool_archive_command: true in the config.")
private String archiveCommand = null;
@Option(paramLabel = "archive_retries", names = { "--max-archive-retries" }, description = "Max number of archive retries.")
private int archiveRetries = Integer.MIN_VALUE;
@Override
public void execute(NodeProbe probe)
{
Boolean bblocking = null;
if (blocking != null)
{
if (!blocking.equalsIgnoreCase("TRUE") && !blocking.equalsIgnoreCase("FALSE"))
throw new IllegalArgumentException("Invalid [" + blocking + "]. Blocking only accepts 'true' or 'false'.");
else
bblocking = Boolean.parseBoolean(blocking);
}
probe.enableAuditLog(logger, Collections.EMPTY_MAP, included_keyspaces, excluded_keyspaces, included_categories, excluded_categories, included_users, excluded_users,
archiveRetries, bblocking, rollCycle, maxLogSize, maxQueueWeight, archiveCommand);
}
}
View on GitHub (pinned to 88fd0f6a0e)