Description
Here is the command I used:
java -cp .:./zookeeper-dev.jar:/usr/local/apache-log4j-1.2.15/log4j-1.2.15.jar -Dlog4j.configuration=log4j_console.properties -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=12122 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false org.apache.zookeeper.server.quorum.QuorumPeerMain zoo.cfg
In addition to the ones in jira 234, we also need the following to connect remotely:
-Dcom.sun.management.jmxremote.port
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
This command assumes no authentication or secure connection through ssl. To use authentication, other options are necessary, such as the password file:
-Dcom.sun.management.jmxremote.password.file
In general, I found the following page a good source of information on this topic:
http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html