[Cassandra] Cassandra3配置JMX remote connection

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wawa8899/article/details/85685671

官方文档:https://docs.datastax.com/en/dse-trblshoot/doc/troubleshooting/connectionsFail.html

[root@cassandra-01 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"

猜你喜欢

转载自blog.csdn.net/wawa8899/article/details/85685671
今日推荐