nodetool describecluster
Returns the name, snitch, partitioner, and schema version of a cluster.
Typically used to validate the schema after upgrading.
Synopsis
nodetool [<connection_options>] describecluster
datacenter_name
Definition
If a parameter has multiple forms, the following reference provides both the short form and long form, separated by a comma.
Connection options
- -h, --host hostname
-
The hostname or IP address of a remote node or nodes. When omitted, the default is the local machine.
- -p, --port jmx_port
-
The JMX port number.
- -pw, --password jmxpassword
-
The JMX password for authenticating with secure JMX. If a password is not provided, you are prompted to enter one.
- -pwf, --password-file jmx_password_filepath
-
The filepath to the file that stores JMX authentication credentials.
- -u, --username jmx_username
-
The username for authenticating with secure JMX.
Command arguments
- datacenter_name
-
The datacenter name.
Examples
Get cluster name, snitch, partitioner, and schema version:
nodetool describecluster dc1
If there is no schema disagreement, then the output lists one schema version:
Cluster Information:
Name: Test Cluster
Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Schema versions:
d4f18346-f81f-3786-aed4-40e03558b299: [127.0.0.1]
If a schema disagreement occurs, the last line of the output includes information about unreachable nodes:
Cluster Information:
Name: Production Cluster
Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Schema versions:
UNREACHABLE: 1176b7ac-8993-395d-85fd-41b89ef49fbb: [10.202.205.203]
Handle schema disagreements
When you run nodetool describecluster or restart nodes, the following messages can be returned if there is a problem validating the schema versions:
Warning: schema version mismatch detected; check the schema versions of your nodes in system.local and system.peers.
Cluster Information:
Name: Cluster12345abcde
Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch
Partitioner: org.apache.cassandra.dht.Murmur3Partitioner
Schema versions:
UNREACHABLE: NODE_ID: [NODE_IP_ADDRESS]
NODE_ID: [NODE_IP_ADDRESS]
NODE_ID: [NODE_IP_ADDRESS]
There are two causes for these messages:
-
The nodes are unavailable and the schema version cannot be verified.
-
The schema versions legitimately don’t match.
Because unavailable nodes can produce false mismatch detected warnings, first run nodetool describecluster to identify any UNREACHABLE nodes.
If there are no UNREACHABLE nodes, compare the schema versions in the output, and then resolve the schema disagreements.
If there are any UNREACHABLE nodes, restart those nodes, and then rerun nodetool describecluster.
Repeat this process until nodetool describecluster doesn’t find any UNREACHABLE nodes.
To ensure there is no schema disagreement, nodetool describecluster must output only one schema version number for all nodes.