首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >从IntelliJ运行Cassandra并获得“连接拒绝”错误

从IntelliJ运行Cassandra并获得“连接拒绝”错误
EN

Stack Overflow用户
提问于 2017-03-08 00:53:50
回答 1查看 527关注 0票数 1

我正尝试在我的系统上用以下配置对Cassandra进行实验:

代码语言:javascript
运行
复制
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源代码的根目录运行以下命令,没有任何失败:

代码语言:javascript
运行
复制
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启动服务器,但总是返回以下错误:

代码语言:javascript
运行
复制
Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused).

有趣的是,当我运行"bin/cqlsh“命令时,它成功地连接,这意味着节点运行良好。

是否知道是什么原因导致"nodetool状态“返回”连接被拒绝“?我也试着关闭防火墙,但没有起作用。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-03-09 00:11:08

通过添加更多VM参数来修正这个问题,如下所示:

代码语言:javascript
运行
复制
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安装程序提供(在我的问题中也有)。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42661094

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档