This page was last edited on February 23, 2017, at 21:25.
Comments or questions about this documentation? Contact us for support!
By default, JMX is not enabled. If you want to enable JMX, you must protect yourself from the Java deserialization vulnerability and other vulnerabilities. You should secure JMX by using the configuration below or by deploying into a secure zone like a DMZ.
To enable remote JMX complete the following:
You can enable remote JMX configuration for Co-browse Server (including embedded Cassandra) or external Cassandra.
To enable remote JMX for Co-browse Server, open your setenv.bat/sh file and uncomment the JMX settings below this line:
Uncomment to enable JMX Remote
If you use external Cassandra and want to monitor Co-browse column family attributes, open your cassandra.bat (Windows) or cassandra-env.sh (UNIX) and enable these JMX settings:
In cassandra.bat, enable the settings below the line:
... JMX REMOTE ACCESS SETTINGS ...
In cassandra-env.sh add:
JMX_PORT="7199" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/cassandra/jmxremote.password" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.access.file=/etc/cassandra/jmxremote.access"
Now that you enabled remote JMX, you can set remote authentication.
-Dcom.sun.management.jmxremote.authenticate=true
By default, the JMX remote settings you enabled in setenv.bat/sh use the jmxremote.access and jmxremote.password files for authentication.
To enable default roles, uncomment the role/password settings at the bottom of the jmxremote.password file. For example:
monitorRole QED controlRole R&D
set JMX_PORT=7199 set JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote ^ -Dcom.sun.management.jmxremote.port=%JMX_PORT% ^ -Dcom.sun.management.jmxremote.ssl=false ^ -Dcom.sun.management.jmxremote.authenticate=true ^ -Dcom.sun.management.jmxremote.password.file=<Path>\jmxremote.password ^ -Dcom.sun.management.jmxremote.access.file=<Path>\jmxremote.access
Set the owner of the jmxremote.password file to the owner of the application process:
In UNIX, run this command:
chown <username> <path to jmxremote.password>
Update the permissions of the jmxremote.password file:
In Windows, open the jmxremote.password file's Permissions:
In Unix, run this command:
chmod 444 <path to jmxremote.password>
After enabling remote JMX, you can test your authentication using the procedure below.