nodetool removenode
Removes a dead or unreachable node from the cluster by streaming its data from remaining replicas.
Synopsis
Section titled “Synopsis”nodetool [connection_options] removenode [--force] <host-id>nodetool [connection_options] removenode statusSee connection options for connection options.
Description
Section titled “Description”nodetool removenode removes a node that cannot be decommissioned because it is dead or unreachable. Unlike decommission (which runs on the node being removed), removenode runs from any live node and reconstructs the dead node's data from other replicas.
What Removenode Does
Section titled “What Removenode Does”When removenode executes, Cassandra performs the following operations:
-
Removes token ownership - The dead node's tokens are removed from the cluster's token ring. These tokens defined which partition ranges the node was responsible for.
-
Updates the ring topology - The cluster recalculates token range assignments. The removed node's token ranges are redistributed to the remaining nodes based on the token allocation strategy (vnode or single-token).
-
Streams data from replicas - For each partition range the dead node owned, data is streamed from surviving replicas to the nodes now responsible for those ranges. This ensures the cluster maintains the configured replication factor.
-
Updates system tables - The node's entry is removed from
system.peersand other system tables across all nodes in the cluster. -
Propagates via gossip - The removal is disseminated to all nodes via the gossip protocol, ensuring every node updates its local view of the cluster topology.
Data Reconstruction Requirement
Since the dead node's data is unavailable, removenode relies entirely on replica nodes to reconstruct the data. If the replication factor is 1 (no replicas), or if all replicas for a partition range are unavailable, that data cannot be recovered and will be lost.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
status | Show status of current removenode operation |
<host-id> | UUID of the node to remove |
Options
Section titled “Options”| Option | Description |
|---|---|
--force | Allow removal even if it would break replication factor |
Finding the Host ID
Section titled “Finding the Host ID”# From nodetool status - shows host ID for all nodesnodetool status
# Output includes Host ID column# Datacenter: dc1# Status=Up/Down# |/ State=Normal/Leaving/Joining/Moving# -- Address Load Tokens Owns Host ID Rack# DN 192.168.1.102 248.87 GiB 256 33.3% b2c3d4e5-f6a7-8901-bcde-f12345678901 rack1The dead node shows DN (Down/Normal). Copy its Host ID.
When to Use
Section titled “When to Use”Node Hardware Failure
Section titled “Node Hardware Failure”When a node's hardware fails and cannot be recovered:
nodetool removenode b2c3d4e5-f6a7-8901-bcde-f12345678901Node Cannot Start
Section titled “Node Cannot Start”When Cassandra cannot start on a node due to corruption or configuration issues that cannot be resolved:
nodetool removenode <host-id>Unplanned Node Loss
Section titled “Unplanned Node Loss”When a node is permanently lost (datacenter issue, etc.):
nodetool removenode <host-id>When NOT to Use
Section titled “When NOT to Use”Node is Still Alive
Section titled “Node is Still Alive”Don't Removenode Live Nodes
If the node is running (even if unhealthy):
- Try to repair the issue
- If removal needed, use
decommissioninstead - Never removenode a live node - causes data inconsistency
Multiple Nodes Down
Section titled “Multiple Nodes Down”Data Loss Risk
If multiple replica nodes are down, removenode cannot reconstruct all data:
RF=3, 2 nodes down → Data on only 1 replicaRF=3, 3 nodes down → Complete data loss for some rangesBring nodes back online if possible before removing any.
Node Was Not Fully Down
Section titled “Node Was Not Fully Down”If the node was intermittently available:
- Ensure it's completely stopped
- Remove from network
- Then run removenode
Removenode Process
Section titled “Removenode Process”- Identify dead node by Host ID
- Verify node is actually down
- Calculate token ranges owned by dead node
- Find remaining replicas for each range
- Stream data from replicas to new owners (monitor with
nodetool netstatsandnodetool removenode status) - Update ring topology
- Complete removal
Examples
Section titled “Examples”Remove Dead Node
Section titled “Remove Dead Node”# Get host IDnodetool status | grep DN
# Remove the nodenodetool removenode b2c3d4e5-f6a7-8901-bcde-f12345678901Check Removenode Status
Section titled “Check Removenode Status”nodetool removenode statusOutput (when removal in progress):
RemovalStatus: Removing node b2c3d4e5-f6a7-8901-bcde-f12345678901 (192.168.1.102): REMOVING_DATAOutput (when no removal active):
No removals in progress.Force Removal (Bypass RF Check)
Section titled “Force Removal (Bypass RF Check)”nodetool removenode --force b2c3d4e5-f6a7-8901-bcde-f12345678901Force Option
The --force option allows removal even if it would break the replication factor. This may result in some token ranges having fewer replicas than configured.
Abort Removenode
Section titled “Abort Removenode”If a removenode operation needs to be aborted:
nodetool abortremovenodeBefore Removenode
Section titled “Before Removenode”Verify Node is Dead
Section titled “Verify Node is Dead”# Should show DN (Down/Normal)nodetool status
# Try to reach the nodeping <node-ip>ssh <node-ip> 'nodetool info'Check Replication Factor
Section titled “Check Replication Factor”DESCRIBE KEYSPACE my_keyspace;Ensure RF > 1 for data availability during removal.
Verify Other Nodes Healthy
Section titled “Verify Other Nodes Healthy”nodetool statusAll other nodes should be UN (Up/Normal).
Consider Consequences
Section titled “Consider Consequences”| RF | Nodes | After Remove 1 | Risk |
|---|---|---|---|
| 3 | 6 | 5 nodes, RF 3 | Safe |
| 3 | 4 | 3 nodes, RF 3 | Minimum |
| 3 | 3 | 2 nodes, RF 3 | Cannot maintain RF |
During Removenode
Section titled “During Removenode”Monitor Progress
Section titled “Monitor Progress”# Check removenode statusnodetool removenode status
# Watch streamingnodetool netstats
# Check system logstail -f /var/log/cassandra/system.log | grep -i removeDo NOT
Section titled “Do NOT”During Removenode
- Do NOT start the dead node
- Do NOT run other topology changes
- Do NOT start repairs
- Do NOT restart live nodes
After Removenode
Section titled “After Removenode”Verify Completion
Section titled “Verify Completion”nodetool statusThe removed node should no longer appear.
Run Repair
Section titled “Run Repair”After removenode, run repair to ensure consistency:
# On each remaining nodenodetool repair -pr my_keyspaceCommon Issues
Section titled “Common Issues”"This host ID is not part of the ring"
Section titled “"This host ID is not part of the ring"”The node was already removed or the Host ID is incorrect:
# Double-check Host IDnodetool ring | grep <host-id>"Cannot remove node - not enough replicas"
Section titled “"Cannot remove node - not enough replicas"”Not enough live replicas to reconstruct data:
# Check how many nodes are upnodetool status | grep UN
# May need to bring another node back online firstRemovenode Stuck
Section titled “Removenode Stuck”# Check statusnodetool removenode status
# Check for issuesnodetool netstatstail /var/log/cassandra/system.logIf truly stuck:
# Force complete (data loss risk)nodetool removenode force"Cannot removenode while bootstrapping"
Section titled “"Cannot removenode while bootstrapping"”Another node is joining. Wait for bootstrap to complete:
# Check for joining nodesnodetool status | grep UJ
# Wait for UN statusRemovenode vs. Decommission vs. Assassinate
Section titled “Removenode vs. Decommission vs. Assassinate”| Operation | Runs On | Use When |
|---|---|---|
decommission | Node being removed | Node is alive |
removenode | Any live node | Node is dead, data can be reconstructed |
assassinate | Any live node | Removenode fails, node gossip state stuck |
Decision Flow
Section titled “Decision Flow”| Question | Yes | No |
|---|---|---|
| Is node responding? | Use decommission | Continue to next question |
| RF > 1 and other replicas alive? | Use removenode | Continue to next question |
| Accept data loss? | Use removenode force or assassinate | Try to recover the node |
Best Practices
Section titled “Best Practices”Removenode Guidelines
- Verify node is truly dead - Don't remove a node that might rejoin
- Check replication first - Ensure data can be reconstructed
- One at a time - Never remove multiple nodes simultaneously
- Monitor progress - Watch streaming and logs
- Repair after - Run repair on remaining nodes
- Document - Record which nodes were removed and when
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| decommission | Remove live node |
| assassinate | Force remove stuck node |
| status | Check cluster state |
| netstats | Monitor streaming |
| repair | Run after removal |