apache/cassandra · error · RuntimeException
Bad query to JMX server:
Error message
Bad query to JMX server:
What it means
RuntimeException wrapper from NodeProbe when querying thread pool MBeans: a MalformedObjectNameException while constructing the ObjectName pattern org.apache.cassandra.metrics:type=ThreadPools,* was caught and rethrown as 'Bad query to JMX server'. Since the pattern is hardcoded, this indicates an environment/registration anomaly rather than user input.
Solutions
- Retry the nodetool command; the failure is typically transient JMX connectivity related
- Verify JMX connectivity and that the remote MBean server is responding
- Check the full chained exception for the malformed name details
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:1993 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/6a2a229c6f9a397c.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/tools/NodeProbe.java:1993
{
try
{
Multimap<String, String> threadPools = HashMultimap.create();
Set<ObjectName> threadPoolObjectNames = mbeanServerConn.queryNames(
new ObjectName("org.apache.cassandra.metrics:type=ThreadPools,*"),
null);
for (ObjectName oName : threadPoolObjectNames)
{
threadPools.put(oName.getKeyProperty("path"), oName.getKeyProperty("scope"));
}
return threadPools;
}
catch (MalformedObjectNameException e)
{
throw new RuntimeException("Bad query to JMX server: ", e);
}
catch (IOException e)
{
throw new RuntimeException("Error getting threadpool names from JMX", e);
}
}
public Object getThreadPoolMetric(String pathName, String poolName, String metricName)
{
String name = String.format("org.apache.cassandra.metrics:type=ThreadPools,path=%s,scope=%s,name=%s",
pathName, poolName, metricName);
try
{
ObjectName oName = new ObjectName(name);
if (!mbeanServerConn.isRegistered(oName))
{
return "N/A";View on GitHub (pinned to 88fd0f6a0e)