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
Syntax legend
| Syntax conventions | Description |
|---|---|
Italic, bold, or |
Syntax diagrams and code samples use one or more of these styles to mark placeholders for variable values. Replace placeholders with a valid option or your own user-defined value. In CQL statements, angle brackets are required to enclose data types in a set, list, map, or tuple.
Separate the data types with a comma.
For example: In Search CQL statements, use angle brackets to identify the entity and literal value to overwrite the XML element in the schema and |
|
Square brackets surround optional command arguments. Do not type the square brackets. |
|
Parentheses identify a group to choose from. Do not type the parentheses. |
|
A pipe separates alternative elements. Type any one of the elements. Do not type the pipe. |
|
Indicates that you can repeat the syntax element as often as required. |
|
Use single quotation marks to surround literal strings in CQL statements.
Use single quotation marks to preserve upper case.
+
For Search CQL only: Single quotation marks surround an entire XML schema declaration, such as |
|
Map collection.
Curly braces enclose maps ( |
|
Ends a CQL statement. |
|
Separate command line options from command arguments with two hyphens. This syntax is useful when arguments might be mistaken for command line options. |
Options
If an option has a short and long form, both forms are given, separated by a comma.
- -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.
- 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.