Skip to content

AxonOps — AI-Native Control Plane for Open Source Data Platforms

Cassandra Cluster Management Troubleshooting

This guide covers diagnosis and resolution of common issues during topology operations.


Terminal window
# Cluster state
nodetool status
# Streaming status
nodetool netstats
# Schema agreement
nodetool describecluster
# Gossip state
nodetool gossipinfo
# Active operations
nodetool compactionstats
Terminal window
# Recent errors
grep -i "error\|exception\|failed" /var/log/cassandra/system.log | tail -50
# Streaming issues
grep -i stream /var/log/cassandra/system.log | tail -50
# Bootstrap/decommission
grep -i "bootstrap\|decommission\|leaving\|joining" /var/log/cassandra/system.log | tail -50

Symptoms: New node starts but doesn't appear in nodetool status

Diagnostic steps:

Terminal window
# Check if Cassandra is running
sudo systemctl status cassandra
# Check for startup errors
tail -100 /var/log/cassandra/system.log | grep -i error
# Verify network connectivity to seeds
nc -zv <seed_ip> 7000
nc -zv <seed_ip> 9042

Common causes and solutions:

CauseDiagnosisSolution
Cluster name mismatchgrep cluster_name cassandra.yamlFix name, clear data, restart
Seeds unreachablenc -zv seed 7000 failsCheck firewall, network
Wrong listen_addressCheck logs for binding errorsFix listen_address in yaml
Data directory not emptyCheck /var/lib/cassandra/dataClear data directories
Schema disagreementnodetool describecluster shows multiple versionsWait or restart seeds
Terminal window
# Clear data for fresh start
sudo systemctl stop cassandra
sudo rm -rf /var/lib/cassandra/data/*
sudo rm -rf /var/lib/cassandra/commitlog/*
sudo rm -rf /var/lib/cassandra/saved_caches/*
sudo systemctl start cassandra

Symptoms: Node shows UJ (Joining) for extended period, streaming shows no progress

Diagnostic steps:

Terminal window
# Check streaming progress
nodetool netstats
# Look for streaming errors
grep -i "stream.*error\|stream.*failed" /var/log/cassandra/system.log
# Check source nodes
nodetool status

Common causes and solutions:

CauseDiagnosisSolution
Source node overloadedHigh CPU/IO on sourceWait or reduce stream throughput
Network issuesPacket loss, timeouts in logsFix network
Large partitionsTimeout errors in logsIncrease streaming_socket_timeout_in_ms
Disk fullCheck df -hFree space
# cassandra.yaml - increase timeouts for large partitions
# 4.0: streaming_socket_timeout_in_ms: 86400000
# 4.1+: streaming_socket_timeout: 24h (duration syntax)
streaming_socket_timeout_in_ms: 86400000 # 24 hours (4.0 syntax)

Version Differences

Cassandra 4.1+ uses duration syntax (e.g., 24h) instead of _in_ms suffixes. Check the version-specific configuration documentation.

Symptoms: Node crashed or was stopped during bootstrap

Recovery:

Terminal window
# Clear partial data and retry
sudo systemctl stop cassandra
sudo rm -rf /var/lib/cassandra/data/*
sudo rm -rf /var/lib/cassandra/commitlog/*
sudo rm -rf /var/lib/cassandra/saved_caches/*
sudo systemctl start cassandra

Symptoms: Node remains in UL (Leaving) state for extended period

Diagnostic steps:

Terminal window
# Check streaming progress
nodetool netstats
# Look for target node issues
nodetool status
# Check logs
grep -i "decommission\|stream" /var/log/cassandra/system.log | tail -50

Common causes and solutions:

CauseDiagnosisSolution
Target nodes unavailablenodetool status shows DNFix target nodes
Network issuesStreaming errors in logsFix network
Target disk fullCheck target df -hFree space on targets
Streaming throttledLow throughput in netstatsIncrease stream throughput

Cannot Cancel Decommission

Once decommission starts, it must complete. If truly stuck:

  1. Try waiting longer (decommission can take many hours)
  2. Fix underlying issues (network, disk, node health)
  3. As last resort: stop the node and use nodetool removenode from another node

Symptoms: Decommissioning node was stopped or crashed

Recovery options:

ScenarioSolution
Node can be restartedRestart; decommission should resume
Node cannot be restartedUse nodetool removenode from other node
Data partially streamedRun repair after recovery

Symptoms: nodetool removenode status shows no progress

Diagnostic steps:

Terminal window
# Check removenode status
nodetool removenode status
# Check streaming
nodetool netstats
# Check logs on executing node
grep -i "remove\|stream" /var/log/cassandra/system.log | tail -50

Solutions:

Terminal window
# If stuck for > 1 hour with no progress
nodetool removenode force <host_id>
# After force removal, run repair
nodetool repair -full

Symptoms: Accidentally removed wrong node

Recovery:

  1. If node still has data: restart it (will try to rejoin)
  2. If data cleared: add as new node (bootstrap)
  3. Run repair to ensure consistency

Symptoms: Node with replace_address_first_boot won't start

Diagnostic steps:

Terminal window
# Check for startup errors
tail -100 /var/log/cassandra/system.log | grep -i error
# Verify dead node is recognized
nodetool status # Should show DN for dead node

Common causes and solutions:

CauseDiagnosisSolution
Dead node not recognizedNot in nodetool status as DNWait for gossip timeout
Wrong IP in replace optionIP mismatchCorrect the JVM option
Data directory not emptyHas old dataClear data directories
Version mismatchCheck versionsInstall matching version

Symptoms: Replacement node stuck in UJ state

Same solutions as bootstrap stalled (see above)

Symptoms: After replacement, node has different token count

Cause: num_tokens doesn't match dead node

Solution:

Terminal window
# Must restart with correct configuration
sudo systemctl stop cassandra
sudo rm -rf /var/lib/cassandra/data/*
# Fix cassandra.yaml
num_tokens: <match_dead_node>
# Restart
sudo systemctl start cassandra

Symptoms: Repeated timeout errors during any topology operation

Terminal window
# Typical error in logs
ERROR [Stream...] stream/StreamResultFuture.java:...
Stream failed: java.net.SocketTimeoutException: Read timed out

Solutions:

# cassandra.yaml - increase timeouts
streaming_socket_timeout_in_ms: 86400000 # 24 hours (default: 1 hour)
# For Cassandra 4.0+
stream_entire_sstables: true # Faster for large files

Symptoms: Topology operations taking excessive time

Diagnosis:

Terminal window
# Check current throughput
nodetool getstreamthroughput
# Check network utilization
iftop -i eth0 # or appropriate interface

Solutions:

Terminal window
# Increase streaming throughput (MB/s)
nodetool setstreamthroughput 400 # Default is 200
# Cassandra 4.0+ in cassandra.yaml
stream_entire_sstables: true

Symptoms: Repeated streaming failures

Diagnostic steps:

Terminal window
# Check for failures
nodetool netstats | grep -i failed
# Check specific errors
grep -i "stream.*failed\|stream.*error" /var/log/cassandra/system.log

Common causes:

CauseSolution
Network instabilityFix network issues
Disk I/O bottleneckReduce concurrent streaming
Memory pressureIncrease heap or reduce streaming
Firewall issuesOpen port 7000 between all nodes

Symptoms: Node appears in nodetool status but shouldn't (already removed)

Cause: Gossip state not properly propagated

Solutions:

Terminal window
# Option 1: Assassinate the stuck node
nodetool assassinate <stuck_node_ip>
# Option 2: If that fails, rolling restart of cluster
# Start with seeds, then other nodes

Symptoms: nodetool describecluster shows multiple schema versions

Diagnostic:

Terminal window
nodetool describecluster
# Example problematic output:
# Schema versions:
# abc-123: [10.0.1.1, 10.0.1.2]
# def-456: [10.0.1.3] <-- Different!

Solutions:

  1. Wait (schema should converge within minutes)
  2. If persists, restart the disagreeing node
  3. If still persists, restart seeds

Verification:

Terminal window
# From each node, verify connectivity to all others
for ip in 10.0.1.1 10.0.1.2 10.0.1.3; do
nc -zv $ip 7000 && echo "$ip:7000 OK" || echo "$ip:7000 FAILED"
nc -zv $ip 9042 && echo "$ip:9042 OK" || echo "$ip:9042 FAILED"
done

Required ports:

PortPurposeRequired Between
7000InternodeAll nodes
7001Internode SSLAll nodes (if SSL)
9042Native transportClients and nodes
7199JMXAdmin hosts

For multi-DC setups:

Terminal window
# Verify cross-DC latency
ping <other_dc_node>
# Should be < 100ms for reasonable performance
# Higher latency impacts streaming and consistency

If a node cannot be recovered and removenode fails:

Terminal window
# 1. Try removenode
nodetool removenode <host_id>
# 2. If stuck, force
nodetool removenode force <host_id>
# 3. If still stuck, assassinate
nodetool assassinate <node_ip>
# 4. Run full repair
nodetool repair -full

Symptoms: Nodes in different groups can't see each other

Immediate actions:

  1. Stop writes if possible
  2. Identify the partition cause (network, firewall)
  3. Restore connectivity
  4. Run full repair
Terminal window
# After connectivity restored
nodetool repair -full