Solved

Nodetool script in SSH remote command


Userlevel 2
Badge +16
Hi,
I am writing a small bash shell script to help automating my tasks on Nutanix system.
This script is quite simple as it will send some remote commands via SSH to Nutanix CVM and host to get the value back.
All seems running well except for the nodetool script.
When I run the below command, I get the error just like this:
"Error: Could not find or load main class org.apache.cassandra.tools.NodeCmd"ssh nutanix@x.x.x.x "/usr/local/nutanix/apache-cassandra/bin/nodetool -h localhost ring"

I have tried some work arounds but there is no hint at all to find a way to make it run as expected.
How can I deal with this?

icon

Best answer by Chandru 19 December 2017, 09:28

hienle The following command should work fine

ssh nutanix@xx.xx.xx.xx "source /etc/profile ; /usr/local/nutanix/apache-cassandra/bin/nodetool -h 0 ring"

View original

1 reply

Userlevel 3
Badge +12
hienle The following command should work fine

ssh nutanix@xx.xx.xx.xx "source /etc/profile ; /usr/local/nutanix/apache-cassandra/bin/nodetool -h 0 ring"

Reply