Cassandra JMX java.rmi.server.ExportException:端口已在使用:7199
我们的卡桑德拉2.2集群(在CentOS 7上)运行良好,除了一件事。当我将Cassandra JMX java.rmi.server.ExportException:端口已在使用:7199,java,cassandra,jmx,Java,Cassandra,Jmx,我们的卡桑德拉2.2集群(在CentOS 7上)运行良好,除了一件事。当我将LOCAL_JMX=no放入cassandra env.sh时,cassandra无法启动,出现以下错误: Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is: java.net.BindException: Address al
LOCAL_JMX=no
放入cassandra env.sh时,cassandra无法启动,出现以下错误:
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is:
java.net.BindException: Address already in use
相关配置如下所示:
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.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=/etc/pki/cassandra/keys/.keystore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStorePassword=password1"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStore=/etc/pki/cassandra/certs/.truststore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStorePassword=password2"
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.rmi.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.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=/etc/pki/cassandra/keys/.keystore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStorePassword=password1"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStore=/etc/pki/cassandra/certs/.truststore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStorePassword=password2"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl.need.client.auth=false"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.registry.ssl=false"
我确实验证了端口上是否没有运行任何东西。如果我改变端口,结果也是一样的。
帮助的是为jmxremote.port
和jmxremote.rmi.port
使用不同的端口,尽管这不符合手册中的建议。不幸的是,即使我不能使用nodetool获取NoSuchObjectException:“表中没有这样的对象”
exception
有什么想法吗?非常感谢。我找到了解决办法。问题出现在以下行中:
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=false"
当我将其切换为true时,可以使用上述设置启动Cassandra(使用公共端口)
然而,这并不意味着问题结束了,因为在使用nodetool时,我开始得到:nodetool:无法连接到-connectionException:“远程端点处的非JRMP服务器”
最终的解决方案是,问题出在SSL中。该协议不支持JMX使用它。因此,唯一的解决方案是将其关闭,工作配置如下:
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.rmi.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.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=/etc/pki/cassandra/keys/.keystore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStorePassword=password1"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStore=/etc/pki/cassandra/certs/.truststore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStorePassword=password2"
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.rmi.port=$JMX_PORT"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.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=/etc/pki/cassandra/keys/.keystore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.keyStorePassword=password1"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStore=/etc/pki/cassandra/certs/.truststore"
JVM_OPTS="$JVM_OPTS -Djavax.net.ssl.trustStorePassword=password2"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl.need.client.auth=false"
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.registry.ssl=false"
然后一切都像一个符咒一样运行。我也遇到了同样的问题,我也启用了
JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.ssl=true"
然而,当我使用--ssl选项运行nodetool时,我能够毫无问题地进行身份验证。因此,您可能错过了--ssl选项?Cassandara也与VMware存在冲突。停止VMware服务后,Cassandra已正确启动。Where is
Cassandra env.sh
I在没有将LOCAL_JMX=no
写入此文件的情况下,出现了相同的错误