Open memelet opened 9 years ago
This is possible as described in #69. kafka-manager does NOT need or use JMX_PORT -- its gets the jmx port from zookeeper.
Well, not really. It seems in order to get a remote connection java.rmi.server.hostname needs to be set the slave ip. I can find no way to do that.
Check broker's log for messages like this:
INFO Will not load MX4J, mx4j-tools.jar is not in the classpath (kafka.utils.Mx4jLoader$)
after modifying build.gradle
by adding (also for same reason there's following line exclude group: "com.sun.jmx"
):
compile "mx4j:mx4j-tools:3.0.1"
(make sure the jar was recompiled: jar tf kafka-mesos-0.9.5.1.jar | grep mx4j
)
I've managed to load mx4j:
INFO mx4j successfuly loaded (kafka.utils.Mx4jLoader$)
The default port seem to be 8082
, but kafka-manager doesn't seem to be able to read the metrics :(
btw. the JMX_PORT
is used just to set java properties in kafka's shell scripts:
-Djava.rmi.server.hostname=$PUBLIC_ADDRESS
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
I've tried that, but JMX still doesn't start.
Allright without the hostname it works:
./kafka-mesos.sh broker update 0..2 --jvm-options "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9998"
and then restart the brokers.
@deric
thnx a lot !!! works perfectly :)
How do I set the JMX_PORT environment variable on the brokers started by the scheduler? I know abouy the --jmv-options, but isn't the env required for kafka-manager?