nodetool removenode
Provides the status of current node removal, forces completion of pending removal, or removes the identified node.
Provides the status of current node removal, forces completion of pending removal, or removes the identified node.
Synopsis
nodetool <options> removenode -- <status> | <force> | <ID>
Short | Long | Description |
---|---|---|
-h |
--host |
Hostname or IP address |
-p |
--port |
Port number |
-pwf |
--password-file |
Password file path |
-pw |
--password |
Password |
-u |
--username |
User name |
-- |
Separates an option from an argument that could be mistaken for a option. |
Other options are:
- status provides status information.
- force forces completion of the pending removal.
- ID is the host ID, in UUID format.
Description
This command removes a node, shows the status of a removal operation, or forces the completion of a pending removal. When the node is down and nodetool decommission cannot be used, use nodetool removenode. Run this command only on nodes that are down. If the cluster does not use vnodes, before running the nodetool removenode command, adjust the tokens.Warning: This command triggers cluster streaming. In
large environments, the additional streaming activity causes more pending gossip tasks in
the output of nodetool tpstats. Nodes can start to appear offline and may need to be
restarted to clear up the back log of pending gossip tasks.
Examples
Determine the UUID of the node to remove by running nodetool status. Use the UUID of the node that is down to remove the node.
nodetool status
Datacenter: DC1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.2.101 112.82 KB 256 31.7% 420129fc-0d84-42b0-be41-ef7dd3a8ad06 RAC1
DN 192.168.2.103 91.11 KB 256 33.9% d0844a21-3698-4883-ab66-9e2fd5150edd RAC1
UN 192.168.2.102 124.42 KB 256 32.6% 8d5ed9f4-7764-4dbd-bad8-43fddce94b7c RAC1
$ nodetool removenode d0844a21-3698-4883-ab66-9e2fd5150edd
View the status of the operation to remove the
node:
nodetool removenode status
RemovalStatus: No token removals in process.
Confirm that the node has been removed.
nodetool status
Datacenter: DC1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.2.101 112.82 KB 256 37.7% 420129fc-0d84-42b0-be41-ef7dd3a8ad06 RAC1
UN 192.168.2.102 124.42 KB 256 38.3% 8d5ed9f4-7764-4dbd-bad8-43fddce94b7c RAC1