Skip to content

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

nodetool version

Displays the Cassandra version running on the node.


Terminal window
nodetool [connection_options] version

See connection options for connection options.

nodetool version returns the release version of the Cassandra instance running on the connected node. This is essential for:

  • Verifying deployment consistency across nodes
  • Confirming successful upgrades
  • Troubleshooting compatibility issues
  • Documentation and audit purposes

ReleaseVersion: 4.1.3

The version follows semantic versioning: MAJOR.MINOR.PATCH

ComponentMeaning
MAJORSignificant changes, may include breaking changes
MINORNew features, backward compatible
PATCHBug fixes, backward compatible

Terminal window
nodetool version

Output:

ReleaseVersion: 4.1.3
#!/bin/bash
# Check versions across all nodes using SSH
for node in node1 node2 node3 node4 node5; do
echo -n "$node: "
ssh "$node" "nodetool version"
done

Output:

node1: ReleaseVersion: 4.1.3
node2: ReleaseVersion: 4.1.3
node3: ReleaseVersion: 4.1.3
node4: ReleaseVersion: 4.1.3
node5: ReleaseVersion: 4.1.3
Terminal window
nodetool version | awk '{print $2}'

Output:

4.1.3

Document current versions before upgrading:

pre_upgrade_versions.sh
#!/bin/bash
echo "=== Pre-Upgrade Versions ==="
for node in $(nodetool status | grep -E "^UN|^DN" | awk '{print $2}'); do
version=$(ssh "$node" 'nodetool version' | awk '{print $2}')
echo "$node: $version"
done > pre_upgrade_versions.txt

Confirm all nodes upgraded successfully:

post_upgrade_verify.sh
#!/bin/bash
echo "=== Post-Upgrade Verification ==="
expected="4.1.4"
for node in $(nodetool status | grep -E "^UN|^DN" | awk '{print $2}'); do
actual=$(ssh "$node" 'nodetool version' | awk '{print $2}')
if [ "$actual" = "$expected" ]; then
echo "$node: $actual"
else
echo "$node: $actual ✗ (expected $expected)"
fi
done

Identify nodes running different versions:

detect_mixed_versions.sh
#!/bin/bash
# Collect all versions via SSH
nodetool status | grep -E "^UN|^DN" | awk '{print $2}' | while read node; do
ssh "$node" 'nodetool version'
done | sort | uniq -c

Output showing mixed versions:

3 ReleaseVersion: 4.1.3
2 ReleaseVersion: 4.1.2

Before connecting tools or drivers:

Terminal window
version=$(nodetool version | awk '{print $2}')
major=$(echo $version | cut -d. -f1)
if [ "$major" -ge 5 ]; then
echo "Cassandra 5.x features available"
else
echo "Running Cassandra 4.x"
fi

VersionKey Features
5.0Accord, Vector Search, Unified Compaction
4.1Guardrails, Pluggable memtable
4.0Virtual tables, Audit logging, Full query logging
3.11Last 3.x release, LTS
3.0Materialized views, SASI indexes
FromToNotes
3.11.x4.0.xSupported direct upgrade
3.0.x4.0.xUpgrade to 3.11.x first
4.0.x4.1.xSupported direct upgrade
4.1.x5.0.xSupported direct upgrade

Mixed Versions

Running mixed versions should only be temporary during rolling upgrades. All nodes should run the same version in steady state.


For more comprehensive version and build details:

Terminal window
# Version only
nodetool version
# Full node information including version
nodetool info | head -10
Terminal window
nodetool info

Shows:

ID : 12345678-1234-1234-1234-123456789012
Gossip active : true
Native Transport active: true
Load : 256.5 GiB
Generation No : 1699876543
Uptime (seconds) : 864000
Heap Memory (MB) : 4096.00 / 8192.00
...

#!/bin/bash
# check_cluster_versions.sh - Verify all nodes run expected version
EXPECTED_VERSION="${1:-}"
if [ -z "$EXPECTED_VERSION" ]; then
echo "Usage: $0 <expected_version>"
echo "Example: $0 4.1.3"
exit 1
fi
echo "Checking cluster for version: $EXPECTED_VERSION"
echo "============================================="
# Get all nodes from local nodetool status
nodes=$(nodetool status | grep -E "^UN|^DN|^UJ|^UL" | awk '{print $2}')
mismatch=0
unreachable=0
for node in $nodes; do
actual=$(ssh "$node" 'nodetool version' 2>/dev/null | awk '{print $2}')
if [ -z "$actual" ]; then
echo "$node: UNREACHABLE"
((unreachable++))
elif [ "$actual" = "$EXPECTED_VERSION" ]; then
echo "$node: $actual"
else
echo "$node: $actual ✗ (expected $EXPECTED_VERSION)"
((mismatch++))
fi
done
echo "============================================="
echo "Summary:"
echo " Expected version: $EXPECTED_VERSION"
echo " Version mismatches: $mismatch"
echo " Unreachable nodes: $unreachable"
if [ $mismatch -gt 0 ] || [ $unreachable -gt 0 ]; then
exit 1
fi
echo "All nodes running expected version"

Terminal window
# Export version as metric
version=$(nodetool version | awk '{print $2}')
echo "cassandra_version{version=\"$version\"} 1"
#!/bin/bash
# Include version in health check output (run locally on each node)
health_check() {
local version=$(nodetool version 2>/dev/null | awk '{print $2}')
local status=$(nodetool status 2>/dev/null | grep "$(hostname -i)" | awk '{print $1}')
echo "{\"node\": \"$(hostname)\", \"version\": \"$version\", \"status\": \"$status\"}"
}
health_check

Terminal window
nodetool version
# Error: Failed to connect to '127.0.0.1:7199'

Causes:

  • Cassandra not running
  • JMX not enabled
  • Firewall blocking JMX port

Resolution:

Terminal window
# Check if Cassandra is running
pgrep -f CassandraDaemon
# Check JMX port
netstat -tlnp | grep 7199
# Check logs
tail /var/log/cassandra/system.log

If nodes show different versions after upgrade:

Terminal window
# Verify package version
dpkg -l | grep cassandra # Debian/Ubuntu
rpm -qa | grep cassandra # RHEL/CentOS
# Verify running version
nodetool version
# If mismatch, may need restart
systemctl restart cassandra

Cassandra logs the version on startup:

Terminal window
grep -i "cassandra version" /var/log/cassandra/system.log | tail -1
-- CQL query for version
SELECT release_version FROM system.local;

For detailed build info:

Terminal window
# Check build info in logs
grep -i "build" /var/log/cassandra/system.log | head -5
# Or from cassandra binary
cassandra -v

Version Management Guidelines

  1. Document versions - Maintain records of deployed versions
  2. Verify after upgrades - Always check all nodes post-upgrade
  3. Minimize mixed time - Complete rolling upgrades promptly
  4. Monitor for drift - Include version in monitoring
  5. Test compatibility - Verify driver/tool compatibility with version
  6. Follow upgrade paths - Don't skip major versions

CommandRelationship
infoDetailed node information
describeclusterCluster-wide information
statusCluster status overview
upgradesstablesUpgrade SSTable format