我尝试将新的cassandra节点添加到现有群集中。 IP地址:
172.31.37.163/32,Port 9160 - >数据库实例1,种子1(已与数据和cassandra 2绑定一起使用)
172.31.39.184 - >数据库实例2(已与数据和cassandra 2绑定一起使用)
172.31.44.13 - >数据库实例3(新节点)
这些是我采取的步骤:
设置cassandra.yaml
如下:
cluster_name: 'Test Cluster' (on all nodes the same name)
num_tokens: 256
class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
seeds: "172.31.37.163"
listen_address:
rpc_address: 0.0.0.0
endpoint_snitch: GossipingPropertyFileSnitch
启动cassandra服务
我收到的新节点上有notetool状态:
ubuntu@ip-172-31-44-13:~$ nodetool status
Datacenter: DC1
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 172.31.44.13 143.08 KB 256 100.0% 701760b7-dd09-4669-a65f-86ebb7da529f RAC1
ubuntu@ip-172-31-44-13:~$
...而不是(种子1):
ubuntu@ip-172-31-37-163:~$ nodetool status
Note: Ownership information does not include topology; for complete information, specify a keyspace
Datacenter: DC1
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 172.31.37.163 3.88 GB 256 52.0% 28da1a11-d063-4acd-8a63-d87c3b7fa980 RAC1
DN 172.31.39.184 ? 256 48.0% 0c206719-5642-4f98-87d4-39b750202b9c r1
ubuntu@ip-172-31-37-163:~$
为什么我看不到种子1的IP地址?