Reputation:
cassandra-env.sh
JMX_PORT=7199
if [ "$LOCAL_JMX" = "yes" ]; then JVM_OPTS="$JVM_OPTS -Dcassandra.jmx.local.port=$JMX_PORT" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false" else 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" #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.ssl.enabled.protocols=" #JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl.enabled.cipher.suites=" #JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStore=/path/to/keystore" #JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStorePassword=" #JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStore=/path/to/truststore" #JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStorePassword=" fi
Also
I am trying to connect to jconsole remote port using nodeportIp:port. Can anyone help me with this?
Upvotes: 1
Views: 303
Reputation: 16353
By design, Cassandra pods are not accessible via JMX outside the Kubernetes cluster. For this reason, there is a management API installed with the Cassandra containers as a sidecar service layer which is used for administrative tasks such as stopping/starting nodes, health checks and running nodetool
commands.
For details on the Management API for Apache Cassandra, see https://github.com/k8ssandra/management-api-for-apache-cassandra.
You won't be able to directly configure cassandra-env.sh
because the cass-operator will override it. For details on K8ssandra.io security and JMX configuration, see https://docs.k8ssandra.io/tasks/secure/. Cheers!
Upvotes: 1