为什么我会看到“ Nodetool状态连接被拒绝”? [英] Why am I seeing "Nodetool status connection refused"?

查看:590
本文介绍了为什么我会看到“ Nodetool状态连接被拒绝”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过服务在运行Ubuntu 16的EC2实例上安装了Cassandra,我一生无法理解为什么我无法使nodetool状态正常工作。

I've installed Cassandra via a service on an EC2 instance running Ubuntu 16, and I can't, for the life of me, understand why I can't get nodetool status working.

我听说我应该更改cassanda-env.sh使其包含主机名(在此已完成);

I've heard that I should change the cassanda-env.sh to include the hostname, which I have done here;

# add this if you're having trouble connecting:
JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=localhost"

但是当我运行 nodetool status

我得到

nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'.

我已经检查了我的安全组,并且允许来自任何地方的所有流量,甚至添加了自定义TCP规则以允许7199端口的通信,但我仍然拒绝连接。

I've checked my security group, and I allow all traffic from anywhere and everywhere, I've even added a custom TCP rule to allow traffic for port 7199 and I still get connection refused.

我可以ping localhost很好;

I can ping localhost just fine;

PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.033 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.011 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.013 ms

并且Cassandra肯定正在运行

And Cassandra is definitely running

ubuntu@ip-172-31-20-215:~$ sudo service cassandra status
● cassandra.service - LSB: distributed storage system for structured data
   Loaded: loaded (/etc/init.d/cassandra; bad; vendor preset: enabled)
   Active: active (exited) since Sun 2017-05-07 05:27:10 UTC; 2min 13s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 30370 ExecStop=/etc/init.d/cassandra stop (code=exited, status=0/SUCCESS)
  Process: 30521 ExecStart=/etc/init.d/cassandra start (code=exited, status=0/SUCCESS)

May 07 05:27:10 ip-172-31-20-215 systemd[1]: Starting LSB: distributed storage system for structured data...
May 07 05:27:10 ip-172-31-20-215 systemd[1]: Started LSB: distributed storage system for structured data.

我不确定我还能做什么,我试图将主机设置为另一个接口,但是我仍然遇到同样的问题。我什至没有安装IPtables,所以我真的不认为这是防火墙问题。

I' not sure what more I can do, i've tried setting the host to another interface, however I still get the same problem. I don't even have IPtables installed so I really don't think it's a firewall issue.

任何帮助将不胜感激,谢谢

Any help would be greatly appreciated, thanks

重启后的调试日志
https://gist.github。 com / anonymous / 263e1ee09d95dc761abaf39d8d3bcb1f

推荐答案

事实证明,您不能在具有512MB RAM的VPS上运行Cassandra ,即使使用单节点群集,您也至少需要2GB。

Turns out, you can't run Cassandra on a VPS with 512MB of RAM, you'll need at least 2GB, even with single-node cluster.

Cassandra在启动后停止了几秒钟,而我无法获得nodetool的状态,因为它不是正在运行。

Cassandra was stopping seconds after starting, and I couldn't nodetool status because it wasn't running.

这篇关于为什么我会看到“ Nodetool状态连接被拒绝”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆