apache/cassandra · error · RuntimeException
Error setting log for on level . Please check logback confi
Error message
Error setting log for on level . Please check logback configuration.
What it means
NodeProbe wraps any exception thrown while changing a class's logging level via the StorageService JMX MBean (ssProxy.setLoggingLevel) into a RuntimeException. This means the requested class qualifier or log level was rejected by the server-side logback configuration, or the JMX call itself failed. The original cause is attached as the exception cause.
Source
Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:2423
public TabularData getCompactionHistory()
{
return compactionProxy.getCompactionHistory();
}
public void reloadTriggers()
{
spProxy.reloadTriggerClasses();
}
public void setLoggingLevel(String classQualifier, String level)
{
try
{
ssProxy.setLoggingLevel(classQualifier, level);
}
catch (Exception e)
{
throw new RuntimeException("Error setting log for " + classQualifier + " on level " + level + ". Please check logback configuration.", e);
}
}
public Map<String, String> getLoggingLevels()
{
return ssProxy.getLoggingLevels();
}
public long getPid()
{
return NativeLibrary.getProcessID();
}
public void resumeBootstrap(PrintStream out) throws IOException
{
BootstrapMonitor monitor = new BootstrapMonitor(out);
try
{View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Verify the class qualifier matches a real logger name (fully-qualified class or package), e.g. org.apache.cassandra.db.
- Use a valid logback level: DEBUG, TRACE, INFO, WARN, or ERROR (VERBOSITY is a log4j-era level).
- Inspect the exception cause (`nodetool` output or server log) to see the underlying logback error.
- Confirm JMX connectivity (nodetool status works) and that logback.xml is valid on the node.
Example fix
// before nodetool setlogginglevel org.apache.cassandra.db.Bootstrap VERBOSITY // after nodetool setlogginglevel org.apache.cassandra.db DEBUG
Defensive patterns
Strategy: validation
Validate before calling
Set<String> valid = Set.of("TRACE","DEBUG","INFO","WARN","ERROR");
if (!valid.contains(level.toUpperCase())) throw new IllegalArgumentException("Invalid log level: " + level);
if (!classQualifier.matches("[a-zA-Z0-9_.]+")) throw new IllegalArgumentException("Invalid logger class: " + classQualifier); Try / catch
try { probe.setLoggingLevel(cls, level); }
catch (RuntimeException e) { logger.error("setLoggingLevel failed for {} at {}: {}", cls, level, e.getCause(), e); } Prevention
- Keep a whitelist of logger names you commonly adjust
- Use only logback-supported levels, not legacy log4j VERBOSITY
- Test setlogginglevel on a staging node first
When it happens
Trigger: Calling `nodetool setlogginglevel <class> <level>` (or NodeProbe.setLoggingLevel) with a class name that does not exist, a level that is not a valid logback level (TRACE/DEBUG/INFO/WARN/ERROR), or when the JMX connection fails mid-call.
Common situations: Typo in the logger class/package name; using a custom level like VERBOSITY with logback (which no longer accepts it, unlike log4j); logback reconfiguration errors on the node; stale JMX connection.
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
- Error while refreshing system.size_estimates
- Unknown Cache metric name
- Unknown BufferPool metric name
- throw new IOException(e)
- Argument must have keyspace and table values.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/d942f8184e93b5e9.
Report an issue: GitHub.