Description
When a Connect worker starts, recent changes from KIP-606 / KAFKA-9960 attempt to put the Kafka cluster ID into the new KafkaMetricsContext. But the Kafka cluster ID can be null, resulting in an NPE shown in the following log snippet:
[2020-06-04 15:01:02,900] INFO Kafka cluster ID: null (org.apache.kafka.connect.util.ConnectUtils) ... [2020-06-04 15:01:03,271] ERROR Stopping due to error (org.apache.kafka.connect.cli.ConnectDistributed) java.lang.NullPointerException at org.apache.kafka.common.metrics.KafkaMetricsContext.lambda$new$0(KafkaMetricsContext.java:48) at java.util.HashMap.forEach(HashMap.java:1289) at org.apache.kafka.common.metrics.KafkaMetricsContext.<init>(KafkaMetricsContext.java:48) at org.apache.kafka.connect.runtime.ConnectMetrics.<init>(ConnectMetrics.java:100) at org.apache.kafka.connect.runtime.Worker.<init>(Worker.java:135) at org.apache.kafka.connect.runtime.Worker.<init>(Worker.java:121) at org.apache.kafka.connect.cli.ConnectDistributed.startConnect(ConnectDistributed.java:111) at org.apache.kafka.connect.cli.ConnectDistributed.main(ConnectDistributed.java:78)
Attachments
Issue Links
- links to