Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to configure cassandra to listen to jmx port on real ip address and not 0.0.0.0?

Tags:

cassandra

I want to make cassandra to litsen to jmx on external ip and not 0.0.0.0 as it used in default. I've added the flag in cassandra-env but it still starts up on the 0.0.0.0 inteface

JVM_OPTS="$JVM_OPTS -Dcom.sun.management.jmxremote.host=172.16.40.60" 

What else should I do?

like image 786
Julias Avatar asked Jul 29 '12 09:07

Julias


People also ask

How do I enable JMX connection in Cassandra?

To enable remote JMX connections, change the LOCAL_JMX setting in cassandra-env.sh. The default settings for Cassandra make JMX accessible only from localhost. If you want to enable remote JMX connections, change the LOCAL_JMX setting in cassandra-env.sh and enable authentication and/or ssl.

What is JMX port in Cassandra?

What ports does Cassandra use? By default, Cassandra uses 7000 for cluster communication (7001 if SSL is enabled), 9042 for native protocol clients, and 7199 for JMX.

What is listen address in Cassandra?

listen_address : The listen address is the IP address of a node that allows it to communicate with other nodes in the cluster. Set to localhost by default. Alternatively, you can set listen_interface to tell Cassandra which interface to use, and consecutively which address to use. Set one property, not both.

What is RPC address in Cassandra?

The address that each Cassandra node shares with clients is the broadcast RPC address; it is controlled by various properties in cassandra. yaml: rpc_address or rpc_interface is the address that the Cassandra process binds to.


1 Answers

add this:

JVM_OPTS="$JVM_OPTS -Djava.rmi.server.hostname=172.16.40.60"

this line is from cassandra-env.sh in apache/cassandra, see here: cassandra-env.sh#L204

like image 63
mh. Avatar answered Oct 04 '22 02:10

mh.