Closed mike-audi closed 4 years ago
My guess is that this can be replicated without Spring Could, just Spring Boot. application/json;charset=UTF-8 try without charset.
Sorry for the slow reply. Removing the charset did not fix the issue. I am able to get the route to execute correctly with the Greenwich release and Spring Boot 2.1.6 release. Just not with either of the Hoxton releases and any of the Spring Boot 2.2.0 milestone releases.
2019-09-19 17:23:36.038 ERROR 45109 --- [ elastic-4] o.s.w.s.adapter.HttpWebHandlerAdapter : [866127b7] 500 Server Error for HTTP GET "/health"
org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type 'application/json' not supported for bodyType=java.util.LinkedHashMap<?, ?>
at org.springframework.web.reactive.function.BodyInserters.unsupportedError(BodyInserters.java:368) ~[spring-webflux-5.2.0.RC1.jar:5.2.0.RC1]
at org.springframework.web.reactive.function.BodyInserters.lambda$writeWithMessageWriters$11(BodyInserters.java:358) ~[spring-webflux-5.2.0.RC1.jar:5.2.0.RC1]
at java.base/java.util.Optional.orElseGet(Optional.java:369) ~[na:na]
at org.springframework.web.reactive.function.BodyInserters.writeWithMessageWriters(BodyInserters.java:358) ~[spring-webflux-5.2.0.RC1.jar:5.2.0.RC1]
at org.springframework.web.reactive.function.BodyInserters.lambda$fromObject$1(BodyInserters.java:98) ~[spring-webflux-5.2.0.RC1.jar:5.2.0.RC1]
at org.springframework.web.reactive.function.server.DefaultServerResponseBuilder$BodyInserterResponse.writeToInternal(DefaultServerResponseBuilder.java:444) ~[spring-webflux-5.2.0.RC1.jar:5.2.0.RC1]
at org.springframework.web.reactive.function.server.DefaultServerResponseBuilder$AbstractServerResponse.writeTo(DefaultServerResponseBuilder.java:376) ~[spring-webflux-5.2.0.RC1.jar:5.2.0.RC1]
at org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.write(AbstractErrorWebExceptionHandler.java:299) ~[spring-boot-autoconfigure-2.2.0.M5.jar:2.2.0.M5]
at org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.lambda$handle$2(AbstractErrorWebExceptionHandler.java:262) ~[spring-boot-autoconfigure-2.2.0.M5.jar:2.2.0.M5]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:117) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:203) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1582) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:143) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2138) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1946) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:1820) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Mono.subscribe(Mono.java:3920) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:75) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators.complete(Operators.java:132) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoEmpty.subscribe(MonoEmpty.java:45) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Mono.subscribe(Mono.java:3920) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onError(FluxMapFuseable.java:134) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators.error(Operators.java:182) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoError.subscribe(MonoError.java:52) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Mono.subscribe(Mono.java:3920) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onError(FluxPeekFuseable.java:227) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onError(MonoPeekTerminal.java:271) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:184) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:250) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onError(FluxContextStart.java:117) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onError(FluxContextStart.java:117) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:184) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:250) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators.error(Operators.java:182) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoError.subscribe(MonoError.java:52) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Mono.subscribe(Mono.java:3920) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onError(Operators.java:1815) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onError(FluxContextStart.java:117) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:184) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:250) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators.error(Operators.java:182) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:128) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap.subscribeOrReturn(MonoFlatMap.java:52) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Mono.subscribe(Mono.java:3912) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:384) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:134) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1582) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:240) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxDefaultIfEmpty$DefaultIfEmptySubscriber.onNext(FluxDefaultIfEmpty.java:92) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:73) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1582) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:145) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:792) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:558) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxFlatMap$FlatMapMain.innerComplete(FluxFlatMap.java:861) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxFlatMap$FlatMapInner.onComplete(FluxFlatMap.java:955) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1566) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoZip$ZipCoordinator.signal(MonoZip.java:247) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.MonoZip$ZipInner.onNext(MonoZip.java:329) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.publisher.FluxSubscribeOnCallable$CallableSubscribeOnSubscription.run(FluxSubscribeOnCallable.java:249) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) ~[reactor-core-3.3.0.M3.jar:3.3.0.M3]
at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
2019-09-19 17:23:36.085 TRACE 45109 --- [ elastic-4] o.s.h.s.r.ReactorHttpHandlerAdapter : [866127b7] Handling completed
Can you try without any spring cloud?
Without spring cloud works
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
spring-boot-starter-actuator is not working after upgrading from Greenwich.RELEASE to Hoxton.M2 (Hoxton.M1 also has the same issue). Specifically the health check endpoint.
I'm not entirely sure if this is a bug or a different/new config is required, just that it works with no other changes with the Greenwich.RELEASE & corresponding spring-boot-starter-parent 2.1.6.RELEASE.
pom.xml
application.properties
console log Triggered via a simple GET request thru postman to the health endpoint creates the following error