[ 
https://issues.apache.org/jira/browse/KAFKA-6008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16191141#comment-16191141
 ] 

ASF GitHub Bot commented on KAFKA-6008:
---------------------------------------

GitHub user scholzj opened a pull request:

    https://github.com/apache/kafka/pull/4012

    KAFKA-6008: Sanitize the Kafka Connect workerId before passing it to 
AppInfoParser

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/scholzj/kafka KAFKA-6008

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/4012.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4012
    
----
commit 8aac02d76ca9bc723a58bd54965977c7a2a6dfec
Author: Jakub Scholz <w...@scholzj.com>
Date:   2017-10-04T11:26:21Z

    Sanitize the workerId before passing it to AppInfoParser

----


> Kafka Connect: Unsanitized workerID causes exception during startup
> -------------------------------------------------------------------
>
>                 Key: KAFKA-6008
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6008
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>    Affects Versions: 1.0.0
>         Environment: MacOS, Java 1.8.0_77-b03
>            Reporter: Jakub Scholz
>             Fix For: 1.0.0
>
>
> When KAfka Connect starts, it seems to use unsanitized workerId for creating 
> Metrics. As a result it throws following exception:
> {code}
> [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)
> {code}
> It looks like in my case the generated workerId is <IP adderess>:<port>. The 
> workerId should be sanitized before creating the metric.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to