9

We have a KStreams app in kotlin and switched from org.apache.kafka:kafka-streams:3.2.3 to org.apache.kafka:kafka-streams:3.3.1 and are now getting the following warning during runtime:

WARN  org.apache.kafka.streams.internals.metrics.ClientMetrics - Error while loading kafka-streams-version.properties
java.lang.NullPointerException: inStream parameter is null
    at java.util.Objects.requireNonNull(Objects.java:246) ~[?:?]
    at java.util.Properties.load(Properties.java:406) ~[?:?]
    at org.apache.kafka.streams.internals.metrics.ClientMetrics.<clinit>(ClientMetrics.java:53) ~[kafka-streams-3.3.1.jar:?]
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:894) ~[kafka-streams-3.3.1.jar:?]
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:856) ~[kafka-streams-3.3.1.jar:?]
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:826) ~[kafka-streams-3.3.1.jar:?]
    at org.apache.kafka.streams.KafkaStreams.<init>(KafkaStreams.java:738) ~[kafka-streams-3.3.1.jar:?]

Have we have overlooked something in the Release Notes that needs to be changed or how to deal with this warning?

Thanks, Matthias

Napkuchen
  • 105
  • 1
  • 6

2 Answers2

6

Same issue here we are getting the warn on application startup. I quickly check implementation of ClientMetrics and it seems that it requires /kafka/kafka-streams-version.properties file on classpath. So probably you could create the file and add it on classpath.

However imho if the file is optional log shouldn't be visible as warn but rather as debug.

enter image description here

Jacek Gzel
  • 470
  • 1
  • 7
  • 16
5

It looks like a bug (KAFKA-14270) to be fixed in 3.4.0.

Sergei Morozov
  • 602
  • 1
  • 7
  • 17