启动时遇到异常:无法用任何种子闲聊

时间:2014-10-03 17:43:33

标签: cassandra cassandra-2.0

我对cassandra很新,我正在尝试在我的家庭虚拟机中设置一个2节点集群...我有两台机器正在运行

            NAME  -  IP Address
machine#1 - cassa - 192.168.1.200
machine#2 - cassa2 - 192.168.1.201

我已经在机器#1上运行了cassandra但现在当我尝试在机器#2上调出cassandra时,我得到的信息低于msg

http://pastebin.com/qsRraVb5

这是机器#1上改变的事情

cluster_name: 'demo'
data_file_directories:
    - /home/cass/cassandra/data
commitlog_directory: /home/cass/cassandra/commitlog
saved_caches_directory: /home/cass/cassandra/saved_caches
seed_provider:
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          - seeds: "192.168.1.200"
listen_address: 192.168.1.200
rpc_address: 192.168.1.200

这是来自机器#2的东西

cluster_name: 'demo'
data_file_directories:
    - /home/cass/cassandra/data
commitlog_directory: /home/cass/cassandra/commitlog
saved_caches_directory: /home/cass/cassandra/saved_caches
seed_provider:
    - class_name: org.apache.cassandra.locator.SimpleSeedProvider
      parameters:
          - seeds: "192.168.1.200"
listen_address: 192.168.1.201
rpc_address: 192.168.1.201

知道我在这里缺少什么吗?

同样你可以看到我可以从机器#2

ping机器#1(我的种子节点)
[cass@cassa2 cassandra]$ ping 192.168.1.200
PING 192.168.1.200 (192.168.1.200) 56(84) bytes of data.
64 bytes from 192.168.1.200: icmp_seq=1 ttl=64 time=1.20 ms
64 bytes from 192.168.1.200: icmp_seq=2 ttl=64 time=0.170 ms
64 bytes from 192.168.1.200: icmp_seq=3 ttl=64 time=0.167 ms
^C
--- 192.168.1.200 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2495ms
rtt min/avg/max/mdev = 0.167/0.515/1.208/0.490 ms
[cass@cassa2 cassandra]$

1 个答案:

答案 0 :(得分:2)

确保Cassandra节点可以相互通信非常重要,特别是在此处找到的节点内端口:http://www.datastax.com/documentation/cassandra/2.1/cassandra/security/secureFireWall_r.html

即使您没有硬件防火墙,您的Linux服务器也可能会出现类似于简单防火墙的内容:

sudo ufw allow 8888
sudo ufw allow 7000
sudo ufw allow 7001
sudo ufw allow 7199
sudo ufw allow 9042
sudo ufw allow 9160
sudo ufw allow 61620
sudo ufw allow 61621

这些是我在Ubuntu 12.04上使用UFW打开端口时必须使用的命令。