Configure JMX on the server side
Complete the following procedure to configure JMX on the server side when enabling secure client-to-node connections using SSL.
jvm-server.options
There are three files that control Java Virtual Machine (JVM) options:
-
jvm-server.options: options independent of any particular JVM -
jvm8-server.options: options particular to JVM 8 -
jvm11-server.options: options particular to JVM 11
The location of the jvm [8 | 11] -server.options file depends on your installation type.
-
Package installations
-
Tarball installations
/etc/hcd/cassandra/jvm [8 \| 11] -server.options
INSTALLATION_LOCATION/resources/cassandra/conf/jvm [8 \| 11] -server.options
Procedure
-
If the
$LOCAL_JMXsetting is present, change it tono."$LOCAL_JMX" = "no" -
Enable JMX authentication by setting
-Dcom.sun.management.jmxremote.authenticatetotrue:JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=true -
Locate the
cassandra-env.shfile. The location of this file depends on your installation type.-
Package installations
-
Tarball installations
/etc/hcd/cassandra/cassandra-env.shINSTALLATION_LOCATION/resources/cassandra/conf/cassandra-env.shReplace INSTALLATION_LOCATION with the path where you extracted the HCD tarball.
-
-
Uncomment the following settings in the
cassandra-env.shfile. You must specify the path to appropriatekeystoreandtruststore, including passwords for each.You can also use the
jvm-server.optionsfile as described in Setting system properties during startup.JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=true" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl.need.client.auth=true" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.registry.ssl=true" JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStore=<path_to_keystore.jks>" JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStorePassword=<keystore-password>" JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStore=<path_to_truststore.jks>" JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStorePassword=<truststore-password>"- com.sun.management.jmxremote.ssl
-
Set to
trueto enable SSL for JMX. - com.sun.management.jmxremote.ssl.need.client.auth
-
Set to
trueto enable two-way certificate authentication. - com.sun.management.jmxremote.registry.ssl
-
Set to
trueto create an RMI registry protected by SSL, and configure a management agent when the JVM starts.