Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-4856

Calling KafkaProducer.close() from multiple threads may cause spurious error

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 0.9.0.0, 0.10.0.0, 0.10.2.0
    • 0.11.0.1, 1.0.0
    • clients
    • None

    Description

      Calling KafkaProducer.close() from multiple threads simultaneously may cause the following harmless error message to be logged. There appears to be a race-condition in AppInfoParser.unregisterAppInfo that we don't guard against.

      WARN Error unregistering AppInfo mbean (org.apache.kafka.common.utils.AppInfoParser:71)
      javax.management.InstanceNotFoundException: kafka.producer:type=app-info,id=<client id>
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
          at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)
          at org.apache.kafka.common.utils.AppInfoParser.unregisterAppInfo(AppInfoParser.java:69)
          at org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:735)
          at org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:686)
          at org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:665)
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            omkreddy Manikumar
            xvrl Xavier Léauté
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment