我遵循了Datastax指南(https://docs.datastax.com/en/archived/cassandra/2.2/cassandra/configuration/secureJmxAuthentication.html)在AWS EC2实例的C * 2.2节点上启用远程jmx连接。
关于配置的一切看起来都不错,但是一旦我将LOCAL_JMX变量设置为“ no”,cassandra进程就不再启动。
当我执行卡桑德拉状态时,我得到了失败的信息:
● cassandra.service - LSB: distributed storage system for structured data
Loaded: loaded (/etc/init.d/cassandra; bad; vendor preset: enabled)
Active: active (exited) since Thu 2019-05-09 11:17:23 UTC; 2min 53s ago
Docs: man:systemd-sysv-generator(8)
Process: 2750 ExecStop=/etc/init.d/cassandra stop (code=exited, status=0/SUCCESS)
Process: 2759 ExecStart=/etc/init.d/cassandra start (code=exited, status=0/SUCCESS)
May 09 11:17:23 ip-172-31-26-31 systemd[1]: Starting LSB: distributed storage system for structured data...
May 09 11:17:23 ip-172-31-26-31 systemd[1]: Started LSB: distributed storage system for structured data.
然后我检查了/ var / logs / cassandra system.log和debug.log,但是不幸的是,在其中一个文件中没有新的日志条目。我只看到旧的日志条目。当我切换回LOCAL_JMX = yes时,cassandra启动,并且可以看到日志条目。但是当失败时,我看不到任何日志条目。
如果没有日志条目,您是否知道如何解决该问题?
其他信息:
cassandra-env.sh
LOCAL_JMX="no"
if [ "x$LOCAL_JMX" = "x" ]; then
LOCAL_JMX=yes
fi
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 -Dcom.sun.management.jmxremote.access.file=/etc/cassandra/jmxremote.access"
# 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
jmxremote.password:
monitorRole QED
controlRole R&D
cassandra cassandra
jmxremote.access:
cassandra readwrite
controlRole readwrite \
create javax.management.monitor.,javax.management.timer. \
unregister
chmod 400
-r-------- 1 cassandra cassandra 114 May 8 15:13 jmxremote.access
-r-------- 1 cassandra cassandra 2871 May 8 14:33 jmxremote.password