How do i enable remote jmx with port in zookeeper zkServer.cmd

Here my zkServer.cmd file :

@echo off


setlocal
call "%~dp0zkEnv.cmd"

set ZOOMAIN=org.apache.zookeeper.server.quorum.QuorumPeerMain

echo on

call %JAVA% "-Dzookeeper.log.dir=%ZOO_LOG_DIR%" "-Dzookeeper.root.logger=%ZOO_LOG4J_PROP%" -cp "%CLASSPATH%" %ZOOMAIN% "%ZOOCFG%" %*

endlocal

First obtain the hostname (or reachable IP eg. lan/public/NAT address):

hostname -i
# or find ip
ip a

next add following options to ZOOMAIN (assumed hostname my.remoteconsole.org and desired port 8989)

-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false 
-Dcom.sun.management.jmxremote.port=8989
-Djava.rmi.server.hostname=my.remoteconsole.org

More details about available options in java docs (http://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html).

How to enable JMX port for Zookeeper server, How do i enable remote jmx with port in zookeeper zkServer.cmd [Unit] Requires=network.target remote-fs.target After=network.target remote-fs.target ExecStart=/bin/sh -c 'zookeeper-server-start zookeeper.properties  See Sun JMX Technology page to get started with JMX. See the JMX Management Guide for details on setting up local and remote management of VM instances. By default the included zkServer.sh supports only local management - review the linked document to enable support for remote management (beyond the scope of this document).

The skServer.sh script will run the zkEnv.sh script which in-turn will look for a script '../conf/zookeeper-env.sh'

create a file on the conf folder called zookeeper-env.sh

Paste this into the file and restart Zookeeper:

JMXLOCALONLY=false
JMXDISABLE=false
JMXPORT=4048
JMXAUTH=false
JMXSSL=false

ZooKeeper JMX, Apache ZooKeeper has extensive support for JMX, allowing you to view and See the JMX Management Guide for details on setting up local and remote By default the included zkServer.sh supports only local management - review the linked Note that the object name includes the client port of the server (name suffix). The zooker server start up script includes the option to enable jmx monitoring but only locally. Can we update the script so that remote monitoring can also be enabled which will help in data collection and monitoring through a centralized monitoring tool.

ADD org.apache.zookeeper.server.quorum.QuorumPeerMain in server-start.

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.

1_Data_Capture/Zookeeper/zookeeper-3.5.5/bin/zkServer.sh , by default we allow local JMX connections if [ "x$JMXLOCALONLY" = "x" ] "x" ] then JMXLOG4J=true fi echo "ZooKeeper remote JMX Port set to <conf-dir>] {​start|start-foreground|stop|restart|status|print-cmd}" >&2 esac  page to get started with JMX. See the JMX Management Guide for details on setting up local and remote management of VM instances. By default the included zkServer.sh supports only local management - review the linked document to enable support for remote management (beyond the scope of this document). 2. Starting ZooKeeper with JMX enabled

Wie aktiviere ich Remote-Jmx mit Port in zookeeper zkServer.cmd , Hier meine zkServer.cmd-Datei: @echo offsetlocalcall% ~ dp0zkEnv.cmdset ZOOMAIN = org.apache.zookeeper.server.quorum.QuorumPeerMainecho oncall​%  Deploy zookeeper-3.4.9 on VM, enable the remote JMX with option: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8415 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.rmi.port=8415. -Djava.rmi.server.hostname=192.168.2.107.

How to configure Solr cloud with Zookeeper Ensemble, ZooKeeper runs in Java release 1.6 (JDK 6) or greater. Windows: zkServer.​cmd at <IP_address>:2181 (you can change the port in the zoo.cfg file). Go to the <Solr_install_dir>/bin directory and open the command prompt. create the index in solr based on the values you configured in JMX console. See the JMX Management Guide for details on setting up local and remote management of VM instances. By default the included zkServer.sh supports only local management - review the linked document to enable support for remote management (beyond the scope of this document).

Standalone Agent Mode, Configuration · Command Line Parameters · Log Parser Patterns · Monitoring This setup requires adding the following arguments to your Java process (your This port has to be reflected in App Agent config, in spm.remote.jmx.url Adjust your zkServer.sh (usually found at /usr/lib/zookeeper/bin/zkServer.sh) by  Yes. using cloudera manager 5.1.0 for the cluster. I need to apply iptables rules, but when I do apply them including allowing port 9010 to the zookeeper nodes, zookeeper immediately goes red on the management node with logging entries indicating jmx access errors.

Comments
  • Thanks a lot @kwarunek