Skip to content

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

nodetool statushandoff

Displays the current status of hinted handoff on the node.


Terminal window
nodetool [connection_options] statushandoff

See connection options for connection options.

nodetool statushandoff reports whether the hinted handoff mechanism is currently enabled or disabled on the node. This command is essential for verifying the state of hinted handoff after enable/disable operations and for routine health checks.

Hinted handoff is a critical consistency mechanism that stores write hints for temporarily unavailable replicas, ensuring data is delivered when those replicas recover.


Hinted handoff is running
Hinted handoff is not running

Terminal window
nodetool statushandoff
Terminal window
# After disabling
nodetool disablehandoff
nodetool statushandoff
# Expected: Hinted handoff is not running
# After enabling
nodetool enablehandoff
nodetool statushandoff
# Expected: Hinted handoff is running

OutputMeaningAction Needed
Hinted handoff is runningHandoff is enabledNone (normal state)
Hinted handoff is not runningHandoff is disabledConsider re-enabling

Default State

Hinted handoff is enabled by default. A "not running" status indicates someone explicitly disabled it or it was disabled in cassandra.yaml.


Confirm enable/disable commands took effect:

Terminal window
# Verify after disable
nodetool disablehandoff
nodetool statushandoff
# Confirm: Hinted handoff is not running
# Verify after enable
nodetool enablehandoff
nodetool statushandoff
# Confirm: Hinted handoff is running

Include in operational health checks:

check_handoff_status.sh
#!/bin/bash
status=$(nodetool statushandoff 2>/dev/null)
if echo "$status" | grep -q "is running"; then
echo "OK: Hinted handoff is enabled"
exit 0
else
echo "WARNING: Hinted handoff is disabled!"
exit 1
fi

Verify state before maintenance operations:

Terminal window
echo "=== Hinted Handoff Status Before Maintenance ==="
nodetool statushandoff
# Perform maintenance...
echo "=== Hinted Handoff Status After Maintenance ==="
nodetool statushandoff

When investigating data consistency problems:

Terminal window
# Check if handoff is enabled
nodetool statushandoff
# If disabled, consistency issues may be due to lost hints
# Re-enable and run repair
nodetool enablehandoff
nodetool repair -pr

Export status as a metric:

#!/bin/bash
# Export handoff status for monitoring
status=$(nodetool statushandoff 2>/dev/null)
if echo "$status" | grep -q "is running"; then
echo "cassandra_hinted_handoff_enabled 1"
else
echo "cassandra_hinted_handoff_enabled 0"
fi
check_hinted_handoff.sh
#!/bin/bash
status=$(nodetool statushandoff 2>/dev/null)
if [ $? -ne 0 ]; then
echo "UNKNOWN - Cannot connect to Cassandra"
exit 3
fi
if echo "$status" | grep -q "is running"; then
echo "OK - Hinted handoff is enabled"
exit 0
else
echo "CRITICAL - Hinted handoff is disabled"
exit 2
fi
#!/bin/bash
# Output JSON for monitoring systems
status=$(nodetool statushandoff 2>/dev/null)
enabled=$(echo "$status" | grep -q "is running" && echo "true" || echo "false")
cat <<EOF
{
"timestamp": "$(date -Iseconds)",
"metric": "hinted_handoff_status",
"enabled": $enabled,
"status_message": "$status"
}
EOF

audit_handoff_cluster.sh
#!/bin/bash
echo "=== Cluster Hinted Handoff Audit ==="
echo ""
# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
all_enabled=true
for node in $nodes; do
status=$(ssh "$node" "nodetool statushandoff" 2>/dev/null)
echo -n "$node: "
if echo "$status" | grep -q "is running"; then
echo "ENABLED"
else
echo "DISABLED"
all_enabled=false
fi
done
echo ""
if [ "$all_enabled" = true ]; then
echo "Status: All nodes have hinted handoff enabled"
else
echo "WARNING: Some nodes have hinted handoff disabled!"
fi
verify_handoff_consistency.sh
#!/bin/bash
# Get list of node IPs from local nodetool status
nodes=$(nodetool status | grep "^UN" | awk '{print $2}')
enabled_count=0
disabled_count=0
for node in $nodes; do
status=$(ssh "$node" "nodetool statushandoff" 2>/dev/null)
if echo "$status" | grep -q "is running"; then
((enabled_count++))
else
((disabled_count++))
fi
done
total=$((enabled_count + disabled_count))
echo "Hinted Handoff Status Summary:"
echo " Total nodes: $total"
echo " Enabled: $enabled_count"
echo " Disabled: $disabled_count"
if [ "$disabled_count" -gt 0 ] && [ "$enabled_count" -gt 0 ]; then
echo ""
echo "WARNING: Inconsistent state across cluster!"
echo "Consider enabling on all nodes for consistency."
fi

The statushandoff command shows whether hint storage is enabled, not whether delivery is paused:

CommandWhat It Checks
statushandoffIs hint storage enabled?
N/A (check tpstats)Is hint delivery active?
Terminal window
# Check both hint storage and delivery status
echo "Hint Storage Status:"
nodetool statushandoff
echo ""
echo "Hint Delivery Activity:"
nodetool tpstats | grep -i hint
Terminal window
# Complete hint system status check
echo "=== Hinted Handoff System Status ==="
echo "1. Handoff Status:"
nodetool statushandoff
echo ""
echo "2. Pending Hints:"
nodetool listpendinghints
echo ""
echo "3. Hint Thread Pool:"
nodetool tpstats | grep -i hint
echo ""
echo "4. Hints Table Size:"
nodetool tablestats system.hints 2>/dev/null | grep "Space used" || echo "No hints table data"

#!/bin/bash
# Check if runtime matches configuration
echo "=== Hinted Handoff Configuration Check ==="
# Runtime status
echo "Runtime Status:"
nodetool statushandoff
# Configuration file
echo ""
echo "cassandra.yaml Setting:"
grep "hinted_handoff_enabled" /etc/cassandra/cassandra.yaml 2>/dev/null || echo "Not found in config"
# Compare
runtime_enabled=$(nodetool statushandoff 2>/dev/null | grep -q "is running" && echo "true" || echo "false")
config_enabled=$(grep "hinted_handoff_enabled" /etc/cassandra/cassandra.yaml 2>/dev/null | grep -q "true" && echo "true" || echo "false")
echo ""
if [ "$runtime_enabled" != "$config_enabled" ]; then
echo "WARNING: Runtime status differs from configuration!"
echo " Runtime: $runtime_enabled"
echo " Config: $config_enabled"
echo " This may indicate a runtime change that won't persist after restart."
else
echo "Runtime status matches configuration."
fi

Terminal window
# Check JMX connectivity
nodetool info
# Verify Cassandra is running
pgrep -f CassandraDaemon

If status doesn't match expectations:

Terminal window
# Check cassandra.yaml setting
grep hinted_handoff_enabled /etc/cassandra/cassandra.yaml
# Check for recent enable/disable commands in logs
grep -i "hint" /var/log/cassandra/system.log | tail -20

If nodes show different statuses:

#!/bin/bash
# Each node maintains its own handoff state
# Synchronize by running on all nodes via SSH:
for node in $(nodetool status | grep "^UN" | awk '{print $2}'); do
ssh "$node" "nodetool enablehandoff"
done
# Verify consistency
for node in $(nodetool status | grep "^UN" | awk '{print $2}'); do
echo -n "$node: "
ssh "$node" "nodetool statushandoff"
done

handoff_status_report.sh
#!/bin/bash
OUTPUT_FILE="/var/log/cassandra/handoff_status_$(date +%Y%m%d).log"
echo "=== Hinted Handoff Status Report ===" | tee $OUTPUT_FILE
echo "Generated: $(date)" | tee -a $OUTPUT_FILE
echo "" | tee -a $OUTPUT_FILE
# Local node status
echo "Local Node Status:" | tee -a $OUTPUT_FILE
nodetool statushandoff | tee -a $OUTPUT_FILE
echo "" | tee -a $OUTPUT_FILE
# Pending hints
echo "Pending Hints:" | tee -a $OUTPUT_FILE
nodetool listpendinghints 2>/dev/null | tee -a $OUTPUT_FILE
echo "" | tee -a $OUTPUT_FILE
# Hint configuration
echo "Configuration:" | tee -a $OUTPUT_FILE
grep -E "hinted_handoff|max_hint" /etc/cassandra/cassandra.yaml 2>/dev/null | tee -a $OUTPUT_FILE
echo "" | tee -a $OUTPUT_FILE
# Assessment
status=$(nodetool statushandoff 2>/dev/null)
if echo "$status" | grep -q "is running"; then
echo "Assessment: Hinted handoff is ENABLED (normal state)" | tee -a $OUTPUT_FILE
else
echo "Assessment: Hinted handoff is DISABLED - ACTION REQUIRED" | tee -a $OUTPUT_FILE
echo "Recommendation: Re-enable with 'nodetool enablehandoff'" | tee -a $OUTPUT_FILE
fi

Status Monitoring Guidelines

  1. Regular checks - Include in routine health monitoring
  2. Cluster consistency - Verify all nodes have the same status
  3. Verify after changes - Always check status after enable/disable
  4. Alert on disabled - Set up alerts for "not running" status
  5. Document changes - Log when and why status was changed
  6. Compare to config - Ensure runtime matches intended configuration

Disabled Hinted Handoff

If statushandoff shows "not running", investigate immediately:

  • Was it intentionally disabled?
  • How long has it been disabled?
  • Are there any down nodes that would have needed hints?
  • Is repair scheduled to restore consistency?

CommandRelationship
enablehandoffEnable hinted handoff
disablehandoffDisable hinted handoff
pausehandoffPause hint delivery
resumehandoffResume hint delivery
listpendinghintsList pending hints
truncatehintsRemove all hints