Reputation: 24184
I am trying to setup two nodes of Cassandra cluster on my windows machine. Basically, I have two windows machine. In both of my machine, I have installed Cassandra 1.2.11 from Datastax. Now I was following this tutorial to setup two node Cassandra Cluster.
After installing Cassandra into those two machines, I stopped the services for the Cassandra server, DataStax OpsCenter, and the DataStax OpsCenter agent in those two machines..
And then I started making changes in the yaml file -
My First Node details are -
initial_token: 0
seeds: "10.0.0.4"
listen_address: 10.0.0.4 #IP of Machine - A (Wireless LAN adapter Wireless Network Connection)
rpc_address: 10.0.0.4
My Second Node details are -
initial_token: 0
seeds: "10.0.0.4"
listen_address: 10.0.0.7 #IP of Machine - B (Wireless LAN adapter Wireless Network Connection)
rpc_address: 10.0.0.7
Both of my serves gets started up properly after I start the services for server. But they are not forming a cluster of two nodes somehow? Is there anything I am missing here?
Machine-A Nodetool Information-
Datacenter: datacenter1
==========
Replicas: 1
Address Rack Status State Load Owns Token
10.0.0.4 rack1 Up Normal 212.1 KB 100.00% 5264744098649860606
Machine-B Nodetool Information-
Starting NodeTool
Datacenter: datacenter1
==========
Replicas: 1
Address Rack Status State Load Owns Token
10.0.0.7 rack1 Up Normal 68.46 KB 100.00% 407804996740764696
Both of my laptops are running Windows 7 64 bit and on the same wi-fi network, sitting next to each other.
Upvotes: 0
Views: 1311
Reputation: 6138
You need to tweak firewall. Cassandra installer does not open firewall for itself. You have to go and create one more Inbound TCP rule. These are the default ports of DataStax Community edition of Cassandra database: 7000, 7001, 9160, 7199, 9042, 8888, 50031, 61620, 8012, 9290, 50030, 50060, 61621, 22, 8983
, but I ended up with 10-65535
rule.
Upvotes: 1
Reputation: 16576
Two nodes with the same intial_token cannot be in the same cluster (even if they are in different data centers). Initial tokens must be unique for each node and it is best to set them so that they span the full range of the partitioner you using.
Upvotes: 0