apache/cassandra · error · RuntimeException
No readable value attribute for CQL metric:
Error message
No readable value attribute for CQL metric:
What it means
RuntimeException thrown by NodeProbe.getCQLMetric when no readable value attribute is found on the CQL metrics MBean for the given metric name. The MBean exists under org.apache.cassandra.metrics:type=CQL but exposes no attribute the code can read a value from — the metric name is wrong or the metric type exposes no scalar attribute.
Solutions
- Check the exact metric name with nodetool or JConsole under org.apache.cassandra.metrics:type=CQL
- Use a metric name that maps to a gauge/counter attribute
- Handle the returned exception in nodetool callers by validating metric names first
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:1965 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/172c484bac874986.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:1965
}
/**
* Retrieve a CQL metric value by name. Works generically for any metric registered under
* {@code org.apache.cassandra.metrics:type=CQL,name=<metricName>} by inspecting the MBean
* attributes at runtime, without requiring knowledge of the underlying metric type.
*/
public Object getCQLMetric(String metricName)
{
try
{
ObjectName objectName = new ObjectName(DefaultNameFactory.GROUP_NAME + ":type=" + CQLMetrics.TYPE_NAME + ",name=" + metricName);
for (MBeanAttributeInfo attr : mbeanServerConn.getMBeanInfo(objectName).getAttributes())
{
String name = attr.getName();
if ("Value".equals(name) || "Count".equals(name))
return mbeanServerConn.getAttribute(objectName, name);
}
throw new RuntimeException("No readable value attribute for CQL metric: " + metricName);
}
catch (MalformedObjectNameException | InstanceNotFoundException | IntrospectionException |
ReflectionException | AttributeNotFoundException | MBeanException | IOException e)
{
throw new RuntimeException(e);
}
}
private static Multimap<String, String> getJmxThreadPools(MBeanServerConnection mbeanServerConn)
{
try
{
Multimap<String, String> threadPools = HashMultimap.create();
Set<ObjectName> threadPoolObjectNames = mbeanServerConn.queryNames(
new ObjectName("org.apache.cassandra.metrics:type=ThreadPools,*"),
null);
View on GitHub (pinned to 88fd0f6a0e)