How to deal with Kafka warning "Error while loading kafka-streams-version.properties java.lang.NullPointerException: inStream parameter is null"
Asked Answered
H

2

10

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

Hopper answered 14/10, 2022 at 8:52 Comment(0)
E
7

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

Ellie answered 26/11, 2022 at 6:0 Comment(1)
3.4.0 is released now since Feb 6Hopper
S
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

Sleety answered 19/10, 2022 at 11:54 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.