ERROR [main] 2019-04-03 15:34:23,376 CassandraDaemon.java:706 - Exception encountered during startup
Error Message:
ERROR [main] 2019-04-03 15:34:23,376 CassandraDaemon.java:706 - Exception encountered during startup
java.lang.RuntimeException: A node with address /10.142.0.7 already exists, cancelling join. Use cassandra.replace_address if you want to replace this node.
at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:557) ~[apache-cassandra-3.11.0.jar:3.11.0]
at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:801) ~[apache-cassandra-3.11.0.jar:3.11.0]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:666) ~[apache-cassandra-3.11.0.jar:3.11.0]
at org.apache.cassandra.service.StorageService.initServer(StorageService.java:612) ~[apache-cassandra-3.11.0.jar:3.11.0]
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:393) [apache-cassandra-3.11.0.jar:3.11.0]
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:600) [apache-cassandra-3.11.0.jar:3.11.0]
at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:689) [apache-cassandra-3.11.0.jar:3.11.0]
INFO [StorageServiceShutdownHook] 2019-04-03 15:34:23,417 HintsService.java:220 - Paused hints dispatch
WARN [StorageServiceShutdownHook] 2019-04-03 15:34:23,419 Gossiper.java:1538 - No local state, state is in silent shutdown, or node hasn't joined, not announcing shutdown
INFO [StorageServiceShutdownHook] 2019-04-03 15:34:23,421 MessagingService.java:984 - Waiting for messaging service to quiesce
INFO [ACCEPT-/10.142.0.7] 2019-04-03 15:34:23,422 MessagingService.java:1338 - MessagingService has terminated the accept() thread
INFO [StorageServiceShutdownHook] 2019-04-03 15:34:23,810 HintsService.java:220 - Paused hints dispatch
Solution:
Remove Node from cluster by using nodetool removenode, then Start the Cassandra on that particular node.
Step-1 :Check the status of node by using below command
root@node1:~/cassandra/apache-cassandra-3.11.0/bin# ./nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
DN 10.142.0.9 75.02 KiB 256 ? 901bc4ca-0936-4c4a-9c76-9dfda2b0906c rack1
UN 10.142.0.6 205.25 KiB 256 ? 967507db-2a28-4657-81ad-c0b965479466 rack1
DN 10.142.0.7 240.03 KiB 256 ? fd2066b5-6ed3-4724-bdd5-c243c8748aa4 rack1
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
Step-2 :Remove the down node by using nodetool remove command
root@node1:~/cassandra/apache-cassandra-3.11.0/bin# ./nodetool removenode fd2066b5-6ed3-4724-bdd5-c243c8748aa4
root@node1:~/cassandra/apache-cassandra-3.11.0/bin#
root@node1:~/cassandra/apache-cassandra-3.11.0/bin# ./nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
DN 10.142.0.9 75.02 KiB 256 ? 901bc4ca-0936-4c4a-9c76-9dfda2b0906c rack1
UN 10.142.0.6 191.2 KiB 256 ? 967507db-2a28-4657-81ad-c0b965479466 rack1
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
root@node1:~/cassandra/apache-cassandra-3.11.0/bin#
Step-3 : Start the Cassandra process on particular node.
root@node1:~/cassandra/apache-cassandra-3.11.0/bin# start cassandra