nodetool statusgossip
Displays the status of the gossip protocol.
Synopsis
Section titled “Synopsis”nodetool [connection_options] statusgossipSee connection options for connection options.
Description
Section titled “Description”nodetool statusgossip shows whether the gossip protocol is running on this node. Gossip is the peer-to-peer protocol Cassandra uses for cluster membership and failure detection.
Output
Section titled “Output”Running
Section titled “Running”runningGossip is active. The node is communicating with other cluster members.
Not Running
Section titled “Not Running”not runningGossip is disabled. The node is isolated from the cluster.
Examples
Section titled “Examples”Check Status
Section titled “Check Status”nodetool statusgossipUse in Scripts
Section titled “Use in Scripts”if [ "$(nodetool statusgossip)" = "running" ]; then echo "Node is participating in cluster"else echo "Node is isolated"fiUnderstanding Gossip
Section titled “Understanding Gossip”Gossip handles:
- Cluster membership: Who is in the cluster
- Failure detection: Which nodes are alive/dead
- Schema changes: Propagating DDL changes
- State sharing: Sharing node metadata
Use Cases
Section titled “Use Cases”Verify Cluster Participation
Section titled “Verify Cluster Participation”nodetool statusgossipPre-Maintenance Check
Section titled “Pre-Maintenance Check”# Check current statenodetool statusgossip
# Disable gossip (isolates node)nodetool disablegossip
# Perform maintenance...
# Re-enable gossipnodetool enablegossip
# Verifynodetool statusgossipNode Health Check
Section titled “Node Health Check”#!/bin/bashGOSSIP=$(nodetool statusgossip)BINARY=$(nodetool statusbinary)
if [ "$GOSSIP" = "running" ]; then echo "Gossip: OK"else echo "WARNING: Gossip disabled - node is isolated!"fi
if [ "$BINARY" = "running" ]; then echo "Binary: OK"else echo "WARNING: CQL disabled - no client connections!"fiWhen Gossip is Disabled
Section titled “When Gossip is Disabled”Isolated Node
When gossip is disabled:
- Node cannot detect other nodes
- Other nodes may mark this node as DOWN
- Schema changes won't propagate
- The node is effectively isolated
Intentional Disable
Section titled “Intentional Disable”For certain maintenance operations:
# Isolate node temporarilynodetool disablegossip
# Do maintenance...
# Rejoin clusternodetool enablegossipAfter Node Restart
Section titled “After Node Restart”Gossip should automatically start. If not:
- Check logs for errors
- Verify seed nodes configuration
- Check network connectivity
# Check logsgrep -i gossip /var/log/cassandra/system.log | tail -20Gossip vs Binary Status
Section titled “Gossip vs Binary Status”| Status | Gossip | Binary | Node State |
|---|---|---|---|
| Normal | running | running | Fully operational |
| Maintenance | running | not running | In cluster but not serving clients |
| Isolated | not running | - | Not participating in cluster |
| Starting | running | not running | Still initializing |
Related Commands
Section titled “Related Commands”| Command | Relationship |
|---|---|
| enablegossip | Enable gossip |
| disablegossip | Disable gossip |
| gossipinfo | Detailed gossip state |
| statusbinary | CQL transport status |
| status | Cluster overview |