Coder Social home page Coder Social logo

Broker Metric not getting updated about cmak HOT 26 OPEN

yahoo avatar yahoo commented on July 17, 2024 1
Broker Metric not getting updated

from cmak.

Comments (26)

patelh avatar patelh commented on July 17, 2024

You need to set JMX_PORT for your broker before starting it.

from cmak.

ashishsoni avatar ashishsoni commented on July 17, 2024

I did setup the JMX port but still not getting updated

from cmak.

guangliangChen avatar guangliangChen commented on July 17, 2024

It is the same to me,and No JMX Port Error was disappeared after I add JMX port.
Do anyone knows the reason.

from cmak.

style95 avatar style95 commented on July 17, 2024

I am also unable to have metrics updated.
I found "javax.management.InstanceNotFoundException" from the server log.

So I browsed JMX metrics using my own Java program and found ObjectName is correct.
What I found is ObjectName should include double quotes in values and domain.

javax.management.InstanceNotFoundException: kafka.server:type=BrokerTopicMetrics,name=sample-service-MessagesInPerSec
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) ~[na:1.7.0_79]
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBeanServerInterceptor.java:679) ~[na:1.7.0_79]
    at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttributes(JmxMBeanServer.java:705) ~[na:1.7.0_79]
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) ~[na:1.7.0_79]
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97) ~[na:1.7.0_79]

For example, it should be like this:
invalid : "kafka.server:type=BrokerTopicMetrics,name=sample-service-MessagesInPerSec"
correct : ""kafka.server":type="BrokerTopicMetrics",name="sample-service-MessagesInPerSec""

If I use above invalid form, I am getting same error: "InstanceNotFoundException".
Maybe Kafka-manager source code needs to be updated.

from cmak.

ystory avatar ystory commented on July 17, 2024

Same problem here

[debug] s.r.client.call - pool-14-thread-21: outbound call received exception: [xxx.xxx.xxx.xxx:xxxxx] exception:
javax.management.InstanceNotFoundException: kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec,topic=xxxxx
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095) ~[na:1.8.0_40]
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttributes(DefaultMBeanServerInterceptor.java:679) ~[na:1.8.0_40]
        at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttributes(JmxMBeanServer.java:705) ~[na:1.8.0_40]
        at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1447) ~[na:1.8.0_40]
        at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) ~[na:1.8.0_40]

from cmak.

patelh avatar patelh commented on July 17, 2024

@style95 what version of Java are you using and what version of Kafka?

from cmak.

patelh avatar patelh commented on July 17, 2024

@ashishsoni @ystory @guangliangChen what version of Java are you using with Kafka? What version of Kafka are you running?

from cmak.

ashishsoni avatar ashishsoni commented on July 17, 2024

Please see below

java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

Kafka

kafka_2.9.1-0.8.2.1

Ashish

from cmak.

ystory avatar ystory commented on July 17, 2024

@patelh
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)

kafka_2.8.0-0.8.1.1

config
/kafka-manager/configs/dev={"name":"dev","curatorConfig":{"host:2181/dev-kafka","zkMaxRetry":100,"baseSleepTimeMs":100,"maxSleepTimeMs":1000},"enabled":false,"kafkaVersion":"0.8.1.1","jmxEnabled":true}

Thank you. :)

from cmak.

style95 avatar style95 commented on July 17, 2024

java version "1.7.0_79"
OpenJDK Runtime Environment (rhel-2.5.5.3.el6_6-x86_64 u79-b14)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

kafka_2.9.2-0.8.1.1 running on CenOS 6.5

Thank you : )

Dongkyoung

from cmak.

rycoxiao avatar rycoxiao commented on July 17, 2024

I also can't update the metrics data.
But i have any error information in server.log.

from cmak.

patelh avatar patelh commented on July 17, 2024

@rycoxiao what version of Java and Kafka are you using?

from cmak.

patelh avatar patelh commented on July 17, 2024

Going to address this by getting it working with OpenJDK.

from cmak.

rycoxiao avatar rycoxiao commented on July 17, 2024

@patelh
Linux version 3.13.0-24-generic (buildd@panlong) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014

java:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

kafka:
0.8.1.1

untitled

from cmak.

imcom avatar imcom commented on July 17, 2024

same here, I am have the following setup

kafka 2.10 0.8.1.1
Linux ip-172-31-21-168 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

java version "1.7.0_75"
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~trusty1)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

from cmak.

yyguzhou avatar yyguzhou commented on July 17, 2024

I also can't get metrics updating, and can't get any error in server.log

centos 6.2 x86_64
kafka 2.9.2-0.8.1.1, use openjdk7u21
kafka-manager use openjdk8u45

from cmak.

HarvinderBhullar avatar HarvinderBhullar commented on July 17, 2024

I am facing the same issue, no error logs

java version "1.8.0_45"

from cmak.

terciodemelo avatar terciodemelo commented on July 17, 2024

I've got the same issue, also with no error logs, has anyone made any progress on solving this? I intend to tackle it asap.

kafka 2.9.2-0.8.1.1
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

from cmak.

patelh avatar patelh commented on July 17, 2024

We use Oracle JDK and collecting JMX metrics seems to work fine. This may be an issue with OpenJDK. As @style95 pointed out, the JMX entity we query for seems to be incorrect for OpenJDK. The fix would just be detecting which JDK is being run and select the right format based on that. I haven't had time to do this yet.

from cmak.

yyguzhou avatar yyguzhou commented on July 17, 2024

@patelh what's version?

from cmak.

 avatar commented on July 17, 2024

same issue here.

kafka_2.9.2-0.8.1.1 on CentOS release 6.6 (Final)
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

from cmak.

patelh avatar patelh commented on July 17, 2024

Looks like mbean names changed between 0.8.1.1 and 0.8.2.* and we are currently using the 0.8.2 names.

from cmak.

patelh avatar patelh commented on July 17, 2024

Can someone try build from this branch and see if they get broker metrics with kafka 0.8.1.1 : #83

from cmak.

 avatar commented on July 17, 2024

@patelh Thanks. It works for me.

from cmak.

KurtYoung avatar KurtYoung commented on July 17, 2024

same problem here

java version:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
OpenJDK (Alibaba) 64-Bit Server VM (build 24.45-b08-internal, mixed mode)

kafka version:
2.10-0.8.2.1

linux version:
Linux 2.6.32-220.23.2.ali927.el5.x86_64 #1 SMP Mon Jan 28 14:57:06 CST 2013 x86_64 x86_64 x86_64 GNU/Linux

from cmak.

patelh avatar patelh commented on July 17, 2024

I've merged changes to allow broker metrics for kafka 0.8.1.1 and 0.8.2.*. Please build off master.

from cmak.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.