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

Kafka Connect: Unsanitized workerID causes exception during startup

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.0
    • Component/s: KafkaConnect
    • Labels:
      None
    • Environment:
      MacOS, Java 1.8.0_77-b03
    • Flags:
      Patch

      Description

      When KAfka Connect starts, it seems to use unsanitized workerId for creating Metrics. As a result it throws following exception:

      [2017-10-04 13:16:08,886] WARN Error registering AppInfo mbean (org.apache.kafka.common.utils.AppInfoParser:66)
      javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
      	at javax.management.ObjectName.construct(ObjectName.java:618)
      	at javax.management.ObjectName.<init>(ObjectName.java:1382)
      	at org.apache.kafka.common.utils.AppInfoParser.registerAppInfo(AppInfoParser.java:60)
      	at org.apache.kafka.connect.runtime.ConnectMetrics.<init>(ConnectMetrics.java:77)
      	at org.apache.kafka.connect.runtime.Worker.<init>(Worker.java:88)
      	at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:81)
      

      It looks like in my case the generated workerId is <IP adderess>:<port>. The workerId should be sanitized before creating the metric.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                scholzj Jakub Scholz
                Reporter:
                scholzj Jakub Scholz
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: