PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

bmvamsi.sql_192302 avatar image
bmvamsi.sql_192302 asked ·

How can I run "nodetool status" without having to SSH to nodes?

We've cassandra cluster(5 nodes in dc1 , 3 nodes in dc2). I need to check the nodetool status. My requirement is to navigate to each and every node in the cluster and run the nodetool status . Though nodetool gives the status of all nodes status information, I need to navigate to the each and every node to know the status because sometimes even the nodetool status says UP and Normal in one node , when i connect to another node nodetool status says that particular node is DOWN.

can you please let me know the nodetool status of all nodes without doing ssh to the nodes .

cassandranodetool
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Erick Ramirez avatar image
Erick Ramirez answered ·

The nodetool command connects to the nodes via JMX to run commands. You can also run commands against remote nodes by specifying the IP with the -h or --host flag.

Example

To illustrate, here is an example nodetool status output:

Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address        Load      Tokens  Owns  Host ID                               Rack 
UN  10.101.33.62   5.57 GiB  16      ?     28932618-36f0-4d6c-8e2d-c05dca3672f5  rack1
UN  10.101.32.215  5.78 GiB  16      ?     1f9008b0-b2ed-41b3-8345-c8b982dec742  rack1
UN  10.101.33.158  6.63 GiB  16      ?     b8ec9c55-76b5-4f0f-b776-799dab6940b8  rack1

From node 10.101.33.158, I can connect to another node with the -h flag to get its host ID:

10.101.33.158 ~ $ nodetool -h 10.101.32.215 info | grep ID
ID                     : 1f9008b0-b2ed-41b3-8345-c8b982dec742

Prerequisites

For remote JMX connections to work, you must set the LOCAL_JMX variable in cassandra-env.sh to no:

if [ "$LOCAL_JMX" = "yes" ]; then

and enable JMX authentication for security reasons. For the step-by-step procedure, see Enabling JMX authentication and authorization.

For more info, see About the nodetool utility. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi,

You can check on nodetool status for any node in your cluster by using the host option in nodetool.

The command syntax: nodetool -h xxx status , where xxx is node hostname or ip address.

To use nodetool, cassandra does not need to be running, but the utility requires the same environment as cassandra itself, namely the same classpath, and you need network connectivity to check on remote nodes.

Would that work for you?

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.