user9607927
user9607927

Reputation:

Unable to Connect to Jconsole - cassandra k8 cluster

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

  1. set $JMX_PORT to no as environment variable
  2. JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=x.x.x.x" (hostname was set to nodeport ip)

I am trying to connect to jconsole remote port using nodeportIp:port. Can anyone help me with this?

Upvotes: 1

Views: 303

Answers (1)

Erick Ramirez
Erick Ramirez

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

Related Questions