In my cassandra cluster , all nodes are available.
But for one node, when I check the status it is showing like:
"nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'."
As I've seen some corrections, I tried restarting cassandra service after setting JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=127.0.0.1". But again it is giving the same status as:
"nodetool: Failed to connect to '127.0.0.1:7199' - ConnectException: 'Connection refused (Connection refused)'."
Can someone suggest another solution?
Can you edit your question with the actual
nodetool statuscommand being run?Also are you using the standard, default
cassandra-env.shfile? Or has it been changed? Regarding local/remote JMX, there are logic checks like this:First of all,
LOCAL_JMXis not defined by default. So if you want to enable remote JMX, you'll need to adjust the code. Secondly, adjusting thermi.server.hostnameneeds to be done in the correct section.Enabling remote JMX also allows JMX to work from the local machine. But the idea is that the port being used (7199, by default) is bound to the same IP that the Cassandra node itself is.
Essentially, if you were to comment-out the local/remote
ifconstructs, these settings should allow JMX (and nodetool) to function. Note: assume an external IP address of 10.2.3.5.Basically, the
rmi.server.hostnameshould match the IP used to connect to the node.If you continue having problems, start by checking your
system.log. At startup, each node should have a line like this:or: