apache/cassandra · warning
JMX settings in cassandra.yaml or cassandra-env.sh have…
Error message
JMX settings in cassandra.yaml or cassandra-env.sh have been bypassed as the JMX connector server is already initialized. Please refer to cassandra.yaml or cassandra-env.sh for JMX configuration info
What it means
Cassandra logs this warning during daemon setup when it detects that a JMX connector server was already initialized by other means (e.g. a remote connector created by jmxremote system properties handled elsewhere or an attach API agent). It skips applying the JMX settings from cassandra.yaml/cassandra-env.sh, so those configured settings are silently ignored.
Solutions
- Remove the com.sun.management.jmxremote.* JVM flags so Cassandra applies the JMX settings from cassandra.yaml/cassandra-env.sh
- Or remove the duplicate JMX settings from cassandra.yaml/cassandra-env.sh and keep only the JVM flags, accepting the bypass
- Verify with jcmd/JConsole which JMX connector is actually listening and confirm only one source of configuration
Example fix
// before (jvm-server.options) -Dcom.sun.management.jmxremote.port=7199 -Dcom.sun.management.jmxremote.authenticate=false // after # flags removed; JMX configured solely in cassandra-env.sh / cassandra.yaml
Defensive patterns
Strategy: validation
Validate before calling
// before starting Cassandra, ensure a single JMX config source
String jmxPort = System.getProperty("com.sun.management.jmxremote.port");
if (jmxPort != null && cassandraYamlHasJmxSettings())
throw new IllegalStateException("JMX configured both via system properties and cassandra.yaml/env"); Prevention
- Configure JMX in exactly one place (prefer cassandra.yaml/cassandra-env.sh)
- Audit jvm-server.options and JAVA_OPTS for com.sun.management.jmxremote.* flags
- After startup, check the log for this warning to detect conflicting config early
When it happens
Trigger: The daemon property COM_SUN_MANAGEMENT_JMXREMOTE_PORT is present (JMX remote was activated via com.sun.management.jmxremote.* system properties) and an external JMX connector server is already bound, so maybeInitJmx returns early without applying yaml/env configuration.
Common situations: Operators set both -Dcom.sun.management.jmxremote.port on the JVM command line and JMX settings in cassandra-env.sh/cassandra.yaml; running under a monitoring agent (e.g. Jolokia or attach-based agents) that opens its own JMX connector; copy-pasting legacy JMX flags into jvm-server.options after migrating JMX config into cassandra.yaml.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Deprecated
- Disabling compaction by setting min_compaction_threshold or…
- Keyspace count warn threshold should be positive, not
- Not yet initialized, can't load new sstables
- Table count warn threshold should be positive, not
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/103882360464dbc5.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/service/CassandraDaemon.java:184
String appenderName = metricName.substring(0, separator);
String metric = metricName.substring(separator + 1); // remove "."
CassandraMetricsRegistry.Metrics.register(DefaultNameFactory.createMetricName(appenderName, metric, null), meter);
}
});
logger = LoggerFactory.getLogger(CassandraDaemon.class);
}
private void maybeInitJmx()
{
// If the standard com.sun.management.jmxremote.port property has been set
// then the JVM agent will have already started up a default JMX connector
// server. This behaviour is deprecated, but some clients may be relying
// on it, so log a warning and skip setting up the server with the settings
// as configured in cassandra.yaml or cassandra-env.sh.
// See: CASSANDRA-11540 & CASSANDRA-11725
if (COM_SUN_MANAGEMENT_JMXREMOTE_PORT.isPresent())
{
logger.warn("JMX settings in cassandra.yaml or cassandra-env.sh have been bypassed as the JMX connector server is " +
"already initialized. Please refer to cassandra.yaml or cassandra-env.sh for JMX configuration info");
return;
}
JAVA_RMI_SERVER_RANDOM_ID.setBoolean(true);
JMXServerOptions jmxServerOptions = DatabaseDescriptor.getJmxServerOptions();
if (!jmxServerOptions.enabled)
return;
try
{
jmxServer = JMXServerUtils.createJMXServer(jmxServerOptions);
}
catch (IOException e)
{
exitOrFail(1, e.getMessage(), e.getCause());
}View on GitHub (pinned to 88fd0f6a0e)