[Cassandra] Cassandra3配置JMX remote connection
阿新 • • 發佈:2019-01-10
官方文件:https://docs.datastax.com/en/dse-trblshoot/doc/troubleshooting/connectionsFail.html
[[email protected] conf]# vi $CASSANDRA_HOME/conf/cassandra-env.sh # Specifies the default port over which Cassandra will be available for # JMX connections. # For security reasons, you should not expose this port to the internet. Firewall it if needed. JMX_PORT="7199" LOCAL_JMX=no #新增一行 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" # if ssl is enabled the same port cannot be used for both jmx and rmi so either # pick another value for this property or comment out to use a random port (though see CASSANDRA-7087 for origins) JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT" # turn on JMX authentication. See below for further options #JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=true" JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=true" #修改成false JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=192.168.1.3" MAX_HEAP_SIZE="16G" #這裡是修改最大堆記憶體的,兩個引數要一起修改 HEAP_NEWSIZE="1600M"