First open cassandra-env.sh
sudo vim /opt/apps/cassandra/conf/cassandra-env.sh
we need to change some configuration
First configure rmi server
JVM_OPTS = "$JVM_OPTS -Djava.rmi.server.hostname=your private ip"
Now add this var in the top of file
LOCAL_JMX=no
If you don't want use autentication, set it to false
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
restart cassandra
and run
/opt/cassandra/bin/nodetool -h MY_NODE_PRIVATE_IP repair -local