我正尝试在我的系统上用以下配置对Cassandra进行实验:
OS: Ubuntu 16.04 LTS
Kernel: 4.10.1
Cassandra source GitHub link: https://github.com/apache/cassandra
Setup process on IntelliJ link: https://wiki.apache.org/cassandra/RunningCassandraInIDEA
我打开一个终端并从Cassandra源代码的根目录运行以下命令,没有任何失败:
bin/cassandra -f (it starts Cassandra successfully)
bin/nodetool status (Get information about the node e.g. datacenter, status etc.)
bin/cqlsh (opens the interface for running the queries)
但是,当我遵循IntelliJ的设置过程时,我可以通过点击"Run“但"nodetool”命令来从IntelliJ启动服务器,但总是返回以下错误:
Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused).
有趣的是,当我运行"bin/cqlsh“命令时,它成功地连接,这意味着节点运行良好。
是否知道是什么原因导致"nodetool状态“返回”连接被拒绝“?我也试着关闭防火墙,但没有起作用。
发布于 2017-03-09 00:11:08
通过添加更多VM参数来修正这个问题,如下所示:
Add the following VM arguments if you want to use nodetool
-Djava.rmi.server.hostname=$JMX_HOST (I entered 127.0.0.1)
-Dcom.sun.management.jmxremote.port=$JMX_PORT (I entered 7199)
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
下面是参考链接:https://wiki.apache.org/cassandra/RunningCassandraInEclipse
这些VM参数没有在wiki页面中为使用IntelliJ:https://wiki.apache.org/cassandra/RunningCassandraInIDEA的Cassandra安装程序提供(在我的问题中也有)。
https://stackoverflow.com/questions/42661094
复制相似问题