Home > Mobile >  Getting "Connection refused" when running nodetool on Cassandra cluster on AWS EC2
Getting "Connection refused" when running nodetool on Cassandra cluster on AWS EC2

Time:10-01

I just did the setup of a cassandra cluster. I have changed the seed, listen_adress and broadcast_adress in the cassandra.yalm file. But when I run the command

$ nodetool flush system

Cmd retrun this error,

nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException:
'Connection refused (Connection refused)'.

in the file etc/cassandra/cassandra-env.sh I made the modification JVM_OPTS as on the screenshot

enter image description here

I use aws at the beginning I was on a t2.micro server. But I switched to a t2.large as recommended in many articles.

Finally, my ports are open as shown in this screenshot and I'm use ubuntu.

enter image description here

CodePudding user response:

By default, remote JMX connections to Cassandra nodes are disabled. If you're running nodetool commands on the EC2 instance itself, it isn't necessary to modify the JVM options cassandra-env.sh.

In fact, we discourage allowing remote JMX connections for security reasons. Only allow remote access if you're an expert and know what you're doing. Cheers!

  • Related