I get:
JMX is not enabled to receive remote connections. \
Please see cassandra-env.sh for more info.
and I am not familiar with cassandra-env.sh
I tried nano /etc/cassandra/cassandra-env.sh in the terminal but from there I'm lost
CodePudding user response:
By default, JMX is only enabled from local, so you can't log in remotely. To change that you need to modify the cassandra-env.sh:
https://docs.datastax.com/en/archived/ddacsecurity/doc/ddacsecurity/secureJmxAuthentication.html
Where you see:
if [ "$LOCAL_JMX" = "yes" ]; then
JVM_OPTS="$JVM_OPTS -Dcassandra.jmx.local.port=$JMX_PORT"
You'll need to change to no so that it hits the remote loop. Then you'll need to configure the following params:
-Dcassandra.jmx.remote.port=7199
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Djava.rmi.server.hostname=10.101.35.37
If you want SSL then you'll need to configure that as well. JMX is just java, so it's not specific to Cassandra. The configuration is actually found in java documentation:
CodePudding user response:
You didn't provide a lot of detail in your post but I'm guessing that you saw the warning in the Cassandra system.log
.
During startup, Cassandra performs certain checks to make sure that the node is configured correctly. One of the checks it performs is to verify that the JMX port is configured.
In your case, you didn't configure JMX for remote access so the WARN
was logged by the StartupChecks.java
class. There is no reason to be alarmed by the message. It is completely fine to not allow remote JMX access, particularly since you are most likely just trying Cassandra out for the first time.
Remote access isn't necessary for Cassandra to function. Unless you plan to run management commands like nodetool
remotely, it's perfectly fine to leave it as-is. You will still be able to run admin commands locally on your Mac. Cheers!