apache/cassandra · error · RuntimeException

Error accessing MBean server:

Error message

Error accessing MBean server: 

What it means

RuntimeException wrapper from NodeProbe.getSaiMetric for IOException raised while querying or reading the SAI metric MBeans from the remote JMX server. The ObjectName was valid; the connection/query itself failed.

Solutions

  1. Check JMX connectivity and credentials
  2. Retry the command; JMX I/O can fail transiently
  3. Verify SAI metrics are registered on the target node
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:2056 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/ff8ac13eff75e012. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:2056

        try
        {
            String scope = getSaiMetricScope(metricName);
            String objectNameStr = String.format("org.apache.cassandra.metrics:type=StorageAttachedIndex,keyspace=%s,table=%s,scope=%s,name=%s",ks, cf, scope, metricName);
            ObjectName oName = new ObjectName(objectNameStr);

            Set<ObjectName> matchingMBeans = mbeanServerConn.queryNames(oName, null);
            if (matchingMBeans.isEmpty())
                return null;

            return getSaiMetricValue(metricName, oName);
        }
        catch (MalformedObjectNameException e)
        {
            throw new RuntimeException("Invalid ObjectName format: " + e.getMessage(), e);
        }
        catch (IOException e)
        {
            throw new RuntimeException("Error accessing MBean server: " + e.getMessage(), e);
        }
    }

    private Object getSaiMetricValue(String metricName, ObjectName oName) throws IOException
    {
        switch (metricName)
        {
            case "QueryLatency":
                return JMX.newMBeanProxy(mbeanServerConn, oName, CassandraMetricsRegistry.JmxTimerMBean.class);
            case "PostFilteringReadLatency":
            case "SSTableIndexesHit":
            case "IndexSegmentsHit":
            case "RowsFiltered":
                return JMX.newMBeanProxy(mbeanServerConn, oName, CassandraMetricsRegistry.JmxHistogramMBean.class);
            case "DiskUsedBytes":
            case "TotalIndexCount":
            case "TotalQueryableIndexCount":
                return JMX.newMBeanProxy(mbeanServerConn, oName, CassandraMetricsRegistry.JmxGaugeMBean.class).getValue();

View on GitHub (pinned to 88fd0f6a0e)