Hi, I parse the zkServer.sh and make changes on /etc/zookeeper/conf/environment
ZOOMAIN="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false com.sun.management.jmxremote.port=20000 org.apache.zookeeper.server.quorum.QuorumPeerMain" which was originally ZOOMAIN="org.apache.zookeeper.server.quorum.QuorumPeerMain" when I run it, it is like root@DO-mq-dev:/etc/zookeeper/bin# ./zkServer.sh start JMX enabled by default Using config: /etc/zookeeper/conf/zoo.cfg Starting zookeeper ... STARTED But when I try to connect it by jconsole: 10.100.70.128:20000, but it fails to connect, is there a way to confirm jmxremote port= 20000? thanks AL On Thu, Jan 8, 2015 at 4:02 PM, Sa Li <sal...@gmail.com> wrote: > > Hi, all > > I've just figured out the monitoring of kafka by jconsole, I want to do > the same thing to zookeeper. Zookeeper site says "The class > *org.apache.zookeeper.server.quorum.QuorumPeerMain* will start a JMX > manageable ZooKeeper server. This class registers the proper MBeans during > initalization to support JMX monitoring and management of the instance. See > *bin/zkServer.sh* for one example of starting ZooKeeper using > QuorumPeerMain." > > I found when I type: > root@pof-kstorm-dev1:/etc/kafka# zkServer.sh start > JMX enabled by default > Using config: /etc/zookeeper/conf/zoo.cfg > Starting zookeeper ... STARTED > > Seems JMX is enabled by default, by checking the zkServer.sh, > > ZOOMAIN="-Dcom.sun.management.jmxremote > -Dcom.sun.management.jmxremote.local.only=$JMXLOCALONLY > org.apache.zookeeper.server.quorum.QuorumPeerMain" > > here > -Dcom.sun.management.jmxremote.local.only=$JMXLOCALONLY , should I change > a jmxport here, or what is the default jmx_port number for zookeeper? > > thanks > > -- > > Alec Li > -- Alec Li