问题
I'm trying to enable JMX in Elassandra 5.5.0.4 through cassandra-evn.sh
file in order to connect to a Cassandra node, remotely, and get metrics and statistics.
I'm trying to connect to JMX using JConsole.
I have followed various tutorial from datastax and blogs without success.
I tried with and without authentication but nothing worked.
回答1:
Make sure the below parameters are set. The configuration enables JMX metrics remotely without any authentication.
# add this if you're having trouble connecting:
JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=<public ip>"
LOCAL_JMX=no
JMX_PORT="7199"
JVM_OPTS="$JVM_OPTS -Dcassandra.jmx.remote.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
来源:https://stackoverflow.com/questions/50628024/how-to-enable-remote-jmx-connections-in-elassandra