Sunday, October 16, 2016

Process for Changing IP Address on Cassandra Nodes in Windows Environment

I needed to perform an IP address change for Cassandra nodes in a Windows environment and couldn't find anything documented so I created the below procedure for performing the task. This process was for a Cassandra v1.2 cluster. 

1. Cleanly shut-down the node (only 1 node should be brought down at a time)
a. Perform drain
nodetool -h drain
b. Disable Gossip
nodetool -h disablegossip
c. Disable Thrift
nodetool -h disablethrift
d. Disable binary (native protocol)
nodetool -h disablebinary
e. Stop Cassandra service

2. Set Cassandra service to disabled

3. Configure purge gossip state information:
Edit cassandra-env.sh file adding: JVM_OPTS="$JVM_OPTS -Dcassandra.load_ring_state=false"

4. Change yaml file setting start_rpc = false and start_native_transport = false (this is only for the node involved in the IP change)

5. Change hosts files on all nodes to the new IP address for the node involved in the change

6. Perform IP change

7. Reboot machine

8. Set Cassandra service to automatic

9. Start service

10. Verify node state, ring, load, activity, etc

11. Run repair on current column families that may have missed writes to re-IP'd node

12. Confirm that data is in sync

13. Edit cassandra-env.sh file removing the line to purge gossip state: JVM_OPTS="$JVM_OPTS -Dcassandra.load_ring_state=false"

14. Change yaml file for the node involved in the IP change setting start_rpc = true and start_native_transport = true

15. Enable binary
nodetool -h enablebinary

16. Enable thrift
nodetool -h enablethrift

No comments:

Post a Comment