apache/cassandra · warning
Use of com.sun.management.jmxremote.port at startup is depre
Error message
Use of com.sun.management.jmxremote.port at startup is deprecated. Please use cassandra.jmx.remote.port instead.
What it means
A WARN log (not an exception) from the deprecation check inspectComSunManagementJmxRemotePort's execute(). Setting the raw JVM property com.sun.management.jmxremote.port to enable JMX is deprecated in Cassandra; configuration of the JMX server moved to jmx_server_options in cassandra.yaml, and the Cassandra-specific system property cassandra.jmx.remote.port is the supported flag. The legacy setting still works but is flagged for removal.
Source
Thrown at src/java/org/apache/cassandra/service/StartupChecks.java:578
}
};
public static final StartupCheck checkJMXProperties = new StartupCheck()
{
@Override
public String name()
{
return "jmx_properties";
}
@Override
public void execute(StartupChecksConfiguration configuration)
{
if (configuration.isDisabled(name()))
return;
if (COM_SUN_MANAGEMENT_JMXREMOTE_PORT.isPresent())
{
logger.warn("Use of com.sun.management.jmxremote.port at startup is deprecated. " +
"Please use cassandra.jmx.remote.port instead.");
}
}
};
public static final StartupCheck inspectJvmOptions = new StartupCheck()
{
@Override
public String name()
{
return "jvm_options";
}
@Override
public void execute(StartupChecksConfiguration configuration)
{
if (configuration.isDisabled(name()))
return;View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Remove -Dcom.sun.management.jmxremote.port from JVM options and configure JMX via jmx_server_options in cassandra.yaml (enabled/remote/jmx_port)
- If a system property is required for your tooling, use cassandra.jmx.remote.port instead of com.sun.management.jmxremote.port
- Restart and confirm the deprecation warning is gone and JMX binds to the expected port
Example fix
// before (jvm-server.options) -Dcom.sun.management.jmxremote.port=7199 // after (cassandra.yaml) jmx_server_options: enabled: true remote: true jmx_port: 7199
Defensive patterns
Strategy: validation
Validate before calling
// Pre-flight: detect legacy JMX port property before starting the JVM
if (System.getProperty("com.sun.management.jmxremote.port") != null)
System.out.println("WARNING: com.sun.management.jmxremote.port is deprecated; use jmx_server_options in cassandra.yaml or cassandra.jmx.remote.port"); Prevention
- Audit jvm-server.options and JAVA_OPTS for com.sun.management.jmxremote.* during upgrades
- Centralize JMX config in cassandra.yaml jmx_server_options
- Use cassandra.jmx.remote.port if a system property is unavoidable
- Add a config-lint rule that flags legacy jmxremote properties in deployment templates
When it happens
Trigger: inspectComSunManagementJmxRemotePort.execute() runs at startup while the JVM system property com.sun.management.jmxremote.port is present (e.g. via -Dcom.sun.management.jmxremote.port=7199 in jvm-server.options or JAVA_OPTS).
Common situations: Deployments carrying over pre-jmx_server_options JVM flags; Helm charts / docker images injecting JMX_PORT via legacy properties; docs or monitoring setups written for older Cassandra versions.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- JMX connection server is not enabled for either local or rem
- JMX is not enabled to receive remote connections. Please see
- %s has authorization enabled which requires %s to enable aut
- JAAS login configuration missing for JMX authenticator setup
- Configure either jmx_server_options in cassandra.yaml and co
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/6a65edb20f2d03c5.
Report an issue: GitHub.