we have a set of Java Spring Boot applications, that we updated today to version 3.0.7. For monitoring the applications we have added dependency "io.micrometer:micrometer-registry-prometheus" to get the additional prometheus actuator. For all the Spring Boot apps that are running on the Webflux stack - use Netty - we see from time to time the following error in the logs:
2023-05-19 13:03:32 ERROR org.springframework.web.server.adapter.HttpWebHandlerAdapter [2cbc5a29-377] Error [java.lang.NullPointerException: Cannot invoke "java.lang.Comparable.compareTo(Object)" because "[]" is null] for HTTP GET "/actuator/prometheus", but ServerHttpResponse already committed (200 OK)
2023-05-19 13:03:32 ERROR reactor.core.publisher.Operators Operator called default onErrorDropped
java.lang.NullPointerException: Cannot invoke "java.lang.Comparable.compareTo(Object)" because "[]" is null
at java.base/java.util.ComparableTimSort.countRunAndMakeAscending(Unknown Source)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
Original Stack Trace:
at java.base/java.util.ComparableTimSort.countRunAndMakeAscending(Unknown Source)
at java.base/java.util.ComparableTimSort.sort(Unknown Source)
at java.base/java.util.Arrays.sort(Unknown Source)
at io.micrometer.common.KeyValues.(KeyValues.java:47)
at io.micrometer.common.KeyValues.of(KeyValues.java:267)
at io.micrometer.observation.Observation$Context.getLowCardinalityKeyValues(Observation.java:1094)
at io.micrometer.core.instrument.observation.DefaultMeterObservationHandler.createTags(DefaultMeterObservationHandler.java:87)
at io.micrometer.core.instrument.observation.DefaultMeterObservationHandler.onStart(DefaultMeterObservationHandler.java:52)
at io.micrometer.observation.ObservationHandler$FirstMatchingCompositeObservationHandler.onStart(ObservationHandler.java:149)
at io.micrometer.observation.SimpleObservation.notifyOnObservationStarted(SimpleObservation.java:232)
at io.micrometer.observation.SimpleObservation.start(SimpleObservation.java:167)
at org.springframework.security.web.server.ObservationWebFilterChainDecorator$AroundWebFilterObservation$SimpleAroundWebFilterObservation$ObservationReference.start(ObservationWebFilterChainDecorator.java:395)
at org.springframework.security.web.server.ObservationWebFilterChainDecorator$AroundWebFilterObservation$SimpleAroundWebFilterObservation.start(ObservationWebFilterChainDecorator.java:276)
at org.springframework.security.web.server.ObservationWebFilterChainDecorator$AroundWebFilterObservation$SimpleAroundWebFilterObservation.lambda$wrap$0(ObservationWebFilterChainDecorator.java:339)
Hello,
we have a set of Java Spring Boot applications, that we updated today to version 3.0.7. For monitoring the applications we have added dependency "io.micrometer:micrometer-registry-prometheus" to get the additional prometheus actuator. For all the Spring Boot apps that are running on the Webflux stack - use Netty - we see from time to time the following error in the logs:
2023-05-19 13:03:32 ERROR org.springframework.web.server.adapter.HttpWebHandlerAdapter [2cbc5a29-377] Error [java.lang.NullPointerException: Cannot invoke "java.lang.Comparable.compareTo(Object)" because "[]" is null] for HTTP GET "/actuator/prometheus", but ServerHttpResponse already committed (200 OK)
2023-05-19 13:03:32 ERROR reactor.core.publisher.Operators Operator called default onErrorDropped
java.lang.NullPointerException: Cannot invoke "java.lang.Comparable.compareTo(Object)" because "[]" is null
at java.base/java.util.ComparableTimSort.countRunAndMakeAscending(Unknown Source)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
__checkpoint ⇢ AuthorizationWebFilter [DefaultWebFilterChain]
checkpoint ⇢ ExceptionTranslationWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ LogoutWebFilter [DefaultWebFilterChain]
__checkpoint ⇢ ServerRequestCacheWebFilter [DefaultWebFilterChain]
checkpoint ⇢ SecurityContextServerWebExchangeWebFilter [DefaultWebFilterChain]
*checkpoint ⇢ AuthenticationWebFilter [DefaultWebFilterChain]
__checkpoint ⇢ ReactorContextWebFilter [DefaultWebFilterChain]
__checkpoint ⇢ HttpHeaderWriterWebFilter [DefaultWebFilterChain]
Original Stack Trace:
at java.base/java.util.ComparableTimSort.countRunAndMakeAscending(Unknown Source)
at java.base/java.util.ComparableTimSort.sort(Unknown Source)
at java.base/java.util.Arrays.sort(Unknown Source)
at io.micrometer.common.KeyValues.(KeyValues.java:47)
at io.micrometer.common.KeyValues.of(KeyValues.java:267)
at io.micrometer.observation.Observation$Context.getLowCardinalityKeyValues(Observation.java:1094)
at io.micrometer.core.instrument.observation.DefaultMeterObservationHandler.createTags(DefaultMeterObservationHandler.java:87)
at io.micrometer.core.instrument.observation.DefaultMeterObservationHandler.onStart(DefaultMeterObservationHandler.java:52)
at io.micrometer.observation.ObservationHandler$FirstMatchingCompositeObservationHandler.onStart(ObservationHandler.java:149)
at io.micrometer.observation.SimpleObservation.notifyOnObservationStarted(SimpleObservation.java:232)
at io.micrometer.observation.SimpleObservation.start(SimpleObservation.java:167)
at org.springframework.security.web.server.ObservationWebFilterChainDecorator$AroundWebFilterObservation$SimpleAroundWebFilterObservation$ObservationReference.start(ObservationWebFilterChainDecorator.java:395)
at org.springframework.security.web.server.ObservationWebFilterChainDecorator$AroundWebFilterObservation$SimpleAroundWebFilterObservation.start(ObservationWebFilterChainDecorator.java:276)
at org.springframework.security.web.server.ObservationWebFilterChainDecorator$AroundWebFilterObservation$SimpleAroundWebFilterObservation.lambda$wrap$0(ObservationWebFilterChainDecorator.java:339)