通过jolokia代理连接到远程cassandra JMX

通过jolokia代理连接到远程cassandra JMX,cassandra,jmx,jolokia,Cassandra,Jmx,Jolokia,我试图通过jolokia()代理和hawt()程序连接到远程cassandra JMX,但我做不到。请指导我jolokia和hatw程序中需要哪些配置和更改。我将在此冒险,并建议您在cassandra配置中未启用远程JMX。根据,您应该编辑cassandra-env.sh并启用remote_jmx(set$LOCAL_jmx=no),然后编辑这些行以满足您的需要: LOCAL_JMX=no if [ "$LOCAL_JMX" = "yes" ]; then JVM_OPTS="$JVM_O

我试图通过jolokia()代理和hawt()程序连接到远程cassandra JMX,但我做不到。请指导我jolokia和hatw程序中需要哪些配置和更改。

我将在此冒险,并建议您在cassandra配置中未启用远程JMX。根据,您应该编辑cassandra-env.sh并启用remote_jmx(set
$LOCAL_jmx=no
),然后编辑这些行以满足您的需要:

LOCAL_JMX=no

if [ "$LOCAL_JMX" = "yes" ]; then
  JVM_OPTS="$JVM_OPTS -Dcassandra.jmx.local.port=$JMX_PORT -XX:+DisableExplicitGC"
else
  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"
#  JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStore=/path/to/keystore"
#  JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStorePassword=<keystore-password>"
#  JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStore=/path/to/truststore"
#  JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStorePassword=<truststore-password>"
#  JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl.need.client.auth=true"
#  JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.registry.ssl=true"
#  JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl.enabled.protocols=<enabled-protocols>"
#  JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl.enabled.cipher.suites=<enabled-cipher-suites>"
fi
LOCAL_JMX=no
如果[“$LOCAL_JMX”=“yes”];然后
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”
#JVM_OPTS=“$JVM_OPTS-Djavax.net.ssl.keyStore=/path/to/keyStore”
#JVM_OPTS=“$JVM_OPTS-Djavax.net.ssl.keystrepassword=”
#JVM_OPTS=“$JVM_OPTS-Djavax.net.ssl.trustStore=/path/to/trustStore”
#JVM_OPTS=“$JVM_OPTS-Djavax.net.ssl.trustStorePassword=”
#JVM_OPTS=“$JVM_OPTS-Dcom.sun.management.jmxremote.ssl.need.client.auth=true”
#JVM_OPTS=“$JVM_OPTS-Dcom.sun.management.jmxremote.registry.ssl=true”
#JVM_OPTS=“$JVM_OPTS-Dcom.sun.management.jmxremote.ssl.enabled.protocols=”
#JVM_OPTS=“$JVM_OPTS-Dcom.sun.management.jmxremote.ssl.enabled.cipher.suites=”
fi

您是否检查了防火墙设置,并尝试先在本地设置整个过程。然后查看您是否可以从想要访问jmx的位置访问远程端口。在我看来,你正面临某种网络问题。此外,请提供您可能已有的任何例外情况和日志。