我需要在Casandra 2上配置JMX。我以这种方式配置了配置文件:
/etc/cassandra/default.conf/cassandra-env.sh
........
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 -Djava.rmi.server.hostname=192.168.1.146"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.authenticate=true"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.password.file=/etc/cassandra/jmxremote.password"
fi
JVM_OPTS="$JVM_OPTS $JVM_EXTRA_OPTS"
chmod 600 /etc/cassandra/jmxremote.password
File content:
monitorRole QED
controlRole R&D
cassandra cassandrapassword
但是在日志文件中我得到:
/usr/sbin/cassandra: line 155: /var/run/cassandra/cassandra.pid: No such file or directory
Error: Password file not readable: /etc/cassandra/jmxremote.password
你能说一下如何解决这个问题吗?