Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.0
    • Fix Version/s: 0.8.2.0
    • Component/s: core
    • Labels:
      None

      Description

      Saw the following when running the new producer in ProducerPerformance.

      [2014-03-03 12:44:07,619] ERROR Error when closing producer (kafka.perf.ProducerPerformance$)
      org.apache.kafka.common.KafkaException: Error unregistering mbean
      at org.apache.kafka.common.metrics.JmxReporter.unregister(JmxReporter.java:100)
      at org.apache.kafka.common.metrics.JmxReporter.close(JmxReporter.java:90)
      at org.apache.kafka.common.metrics.Metrics.close(Metrics.java:204)
      at org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:279)
      at kafka.perf.ProducerPerformance$NewShinyProducer.close(ProducerPerformance.scala:222)
      at kafka.perf.ProducerPerformance$ProducerThread.run(ProducerPerformance.scala:299)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: javax.management.InstanceNotFoundException: kafka:type=producer
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:415)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:403)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:506)
      at org.apache.kafka.common.metrics.JmxReporter.unregister(JmxReporter.java:98)
      ... 8 more

        Activity

        Hide
        junrao Jun Rao added a comment -

        I think this can happen when multiple instances of producers are created in the same jvm. Right now, their jmx bean names collide. We should guard this case. Also, we should include the client id in the jmx bean name to distinguish the stats from different producer instances.

        Show
        junrao Jun Rao added a comment - I think this can happen when multiple instances of producers are created in the same jvm. Right now, their jmx bean names collide. We should guard this case. Also, we should include the client id in the jmx bean name to distinguish the stats from different producer instances.
        Hide
        jkreps Jay Kreps added a comment -

        Yes I think this should be very easy. I actually implemented a prefix in the JMX registration, I just don't populate it yet with the clientId.

        Show
        jkreps Jay Kreps added a comment - Yes I think this should be very easy. I actually implemented a prefix in the JMX registration, I just don't populate it yet with the clientId.
        Hide
        junrao Jun Rao added a comment -

        Created reviewboard https://reviews.apache.org/r/19360/
        against branch origin/trunk

        Show
        junrao Jun Rao added a comment - Created reviewboard https://reviews.apache.org/r/19360/ against branch origin/trunk
        Hide
        junrao Jun Rao added a comment -

        Thanks for the review. Committed to trunk.

        Show
        junrao Jun Rao added a comment - Thanks for the review. Committed to trunk.

          People

          • Assignee:
            junrao Jun Rao
            Reporter:
            junrao Jun Rao
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development