jmx未启用接收远程连接

时间:2015-07-30 10:29:44

标签: cassandra jvm

我不确定为什么7199正在收听127.0.0.1,我怎么能让7199收听hostip地址。

我的cassandra-env.sh配置如下JVM

JMX_PORT = “7199”

JVM_OPTS =“$ JVM_OPTS -Djava.net.preferIPv4Stack = true”

JVM_OPTS =“$ JVM_OPTS -Djava.rmi.server.hostname = 192.68.0.45” LOCAL_JMX =无

如果[“$ LOCAL_JMX”=“是”];然后

JVM_OPTS =“$ JVM_OPTS -Dcassandra.jmx.local.port = $ JMX_PORT -XX:+ DisableExplicitGC”

否则 JVM_OPTS =“$ JVM_OPTS -Dcom.sun.management.jmxremote.port = $ JMX_PORT”

JVM_OPTS =“$ JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port = $ JMX_PORT”

JVM_OPTS =“$ JVM_OPTS -Dcom.sun.management.jmxremote.ssl = false”

JVM_OPTS =“$ JVM_OPTS -Dcom.sun.management.jmxremote.authenticate = true”

JVM_OPTS =“$ JVM_OPTS -Dcom.sun.management.jmxremote.password.file = / etc / cassandra / jmxremote.password”

1 个答案:

答案 0 :(得分:1)

我也一直在打这个问题。并不像教程中那样简单。

我解决了这个问题:

  1. 将环境变量LOCAL_JMX添加到我的.bashrc文件中:
  2. 
        #Set LOCAL_JMX
        export LOCAL_JMX=no
    
    
    1. 在cassandra-env.sh中禁用密码验证(test environmnent !!):
    2. 
          JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
          #  JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/cassandra/jmxremote.password"
      
      
      1. 重新启动每个节点