spring-cloud / spring-cloud-release

Spring Cloud Release Train - dependency management across a wide range of Spring Cloud projects.
http://projects.spring.io/spring-cloud
Apache License 2.0
877 stars 181 forks source link

spring-boot-starter-actuator not working after upgrading to Hoxton.M2 #172

Closed mike-audi closed 4 years ago

mike-audi commented 5 years ago

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

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.2.0.M4</version>
</parent>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-dependencies</artifactId>
            <version>Hoxton.M2</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-configuration-processor</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-webflux</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-gateway</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-gateway-webflux</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-security</artifactId>
    </dependency>
</dependencies>

application.properties

# Management server settings
management.endpoints.enabled-by-default=false
management.endpoints.jmx.exposure.include=health
management.endpoints.web.exposure.include=health
management.endpoints.web.base-path=/
management.endpoint.health.enabled=true

console log Triggered via a simple GET request thru postman to the health endpoint creates the following error

2019-08-21 00:37:43.662 TRACE 49439 --- [ctor-http-nio-4] o.s.w.s.adapter.HttpWebHandlerAdapter    : [78484955] HTTP GET "/health", headers={masked}
2019-08-21 00:37:43.662 TRACE 49439 --- [ctor-http-nio-4] i.b.m.f.o.OauthTokenClient               : Trying to validate token null
2019-08-21 00:37:43.663 TRACE 49439 --- [ctor-http-nio-4] o.s.c.g.f.WeightCalculatorWebFilter      : Weights attr: {}
2019-08-21 00:37:43.666 DEBUG 49439 --- [ctor-http-nio-4] .b.a.e.w.r.WebFluxEndpointHandlerMapping : [78484955] Mapped to org.springframework.boot.actuate.endpoint.web.reactive.AbstractWebFluxEndpointHandlerMapping$ReadOperationHandler@1db54acb
2019-08-21 00:37:43.671 TRACE 49439 --- [      elastic-4] o.s.b.f.s.DefaultListableBeanFactory     : Returning cached instance of singleton bean 'refreshScope'
2019-08-21 00:37:43.678 DEBUG 49439 --- [      elastic-5] .s.w.r.r.m.a.ResponseEntityResultHandler : Using 'application/vnd.spring-boot.actuator.v2+json' given [*/*] and supported [application/vnd.spring-boot.actuator.v2+json, application/json]
2019-08-21 00:37:43.679 DEBUG 49439 --- [      elastic-5] .s.w.r.r.m.a.ResponseEntityResultHandler : [78484955] 0..1 [org.springframework.boot.actuate.health.Health]
2019-08-21 00:37:43.680 TRACE 49439 --- [      elastic-5] o.s.w.r.function.server.RouterFunctions  : [78484955] Matched org.springframework.web.reactive.function.server.RequestPredicates$$Lambda$937/0x00000008006a8040@225aed8d
2019-08-21 00:37:43.681 DEBUG 49439 --- [      elastic-5] a.w.r.e.AbstractErrorWebExceptionHandler : [78484955] Resolved [NotAcceptableStatusException: 406 NOT_ACCEPTABLE "Could not find acceptable representation"] for HTTP GET /health
2019-08-21 00:37:43.684 ERROR 49439 --- [      elastic-5] o.s.w.s.adapter.HttpWebHandlerAdapter    : [78484955] 500 Server Error for HTTP GET "/health"

org.springframework.web.reactive.function.UnsupportedMediaTypeException: Content type 'application/json;charset=UTF-8' not supported for bodyType=java.util.LinkedHashMap<?, ?>
    at org.springframework.web.reactive.function.BodyInserters.unsupportedError(BodyInserters.java:300) ~[spring-webflux-5.2.0.M3.jar:5.2.0.M3]
    at org.springframework.web.reactive.function.BodyInserters.lambda$writeWithMessageWriters$9(BodyInserters.java:290) ~[spring-webflux-5.2.0.M3.jar:5.2.0.M3]
    at java.base/java.util.Optional.orElseGet(Optional.java:369) ~[na:na]
    at org.springframework.web.reactive.function.BodyInserters.writeWithMessageWriters(BodyInserters.java:290) ~[spring-webflux-5.2.0.M3.jar:5.2.0.M3]
    at org.springframework.web.reactive.function.BodyInserters.lambda$fromObject$1(BodyInserters.java:85) ~[spring-webflux-5.2.0.M3.jar:5.2.0.M3]
    at org.springframework.web.reactive.function.server.DefaultServerResponseBuilder$BodyInserterResponse.writeToInternal(DefaultServerResponseBuilder.java:419) ~[spring-webflux-5.2.0.M3.jar:5.2.0.M3]
    at org.springframework.web.reactive.function.server.DefaultServerResponseBuilder$AbstractServerResponse.writeTo(DefaultServerResponseBuilder.java:351) ~[spring-webflux-5.2.0.M3.jar:5.2.0.M3]
    at org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.write(AbstractErrorWebExceptionHandler.java:299) ~[spring-boot-autoconfigure-2.2.0.M4.jar:2.2.0.M4]
    at org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler.lambda$handle$2(AbstractErrorWebExceptionHandler.java:262) ~[spring-boot-autoconfigure-2.2.0.M4.jar:2.2.0.M4]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:118) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onNext(FluxPeekFuseable.java:204) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1575) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:144) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:67) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2131) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1939) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:1813) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3850) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:75) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators.complete(Operators.java:132) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoEmpty.subscribe(MonoEmpty.java:45) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoSwitchIfEmpty.subscribe(MonoSwitchIfEmpty.java:44) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoSwitchIfEmpty.subscribe(MonoSwitchIfEmpty.java:44) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoPeekFuseable.subscribe(MonoPeekFuseable.java:74) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3850) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onError(FluxMapFuseable.java:134) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators.error(Operators.java:182) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoError.subscribe(MonoError.java:52) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoOnAssembly.subscribe(MonoOnAssembly.java:61) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3850) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxPeekFuseable$PeekFuseableSubscriber.onError(FluxPeekFuseable.java:228) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onError(MonoPeekTerminal.java:272) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:185) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:251) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onError(FluxContextStart.java:117) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onError(FluxContextStart.java:117) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:185) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:251) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators.error(Operators.java:182) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoError.subscribe(MonoError.java:52) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3850) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onError(Operators.java:1808) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxContextStart$ContextStartSubscriber.onError(FluxContextStart.java:117) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondError(MonoFlatMap.java:185) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapInner.onError(MonoFlatMap.java:251) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:100) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators.error(Operators.java:182) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:129) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:53) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Mono.subscribe(Mono.java:3850) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:97) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnAssembly$OnAssemblySubscriber.onError(FluxOnAssembly.java:392) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:135) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1575) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:241) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxDefaultIfEmpty$DefaultIfEmptySubscriber.onNext(FluxDefaultIfEmpty.java:92) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:73) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:121) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1575) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoCollect$CollectSubscriber.onComplete(MonoCollect.java:145) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.checkTerminated(FluxFlatMap.java:794) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.drainLoop(FluxFlatMap.java:560) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxFlatMap$FlatMapMain.innerComplete(FluxFlatMap.java:863) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.FluxFlatMap$FlatMapInner.onComplete(FluxFlatMap.java:957) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.Operators$MonoSubscriber.complete(Operators.java:1559) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoZip$ZipCoordinator.signal(MonoZip.java:247) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoZip$ZipInner.onNext(MonoZip.java:329) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:156) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at org.springframework.boot.actuate.health.HealthIndicatorReactiveAdapter.invoke(HealthIndicatorReactiveAdapter.java:49) ~[spring-boot-actuator-2.2.0.M4.jar:2.2.0.M4]
    at org.springframework.boot.actuate.health.HealthIndicatorReactiveAdapter.lambda$null$0(HealthIndicatorReactiveAdapter.java:43) ~[spring-boot-actuator-2.2.0.M4.jar:2.2.0.M4]
    at reactor.core.scheduler.ElasticScheduler$DirectScheduleTask.run(ElasticScheduler.java:294) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:50) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:27) ~[reactor-core-3.3.0.M2.jar:3.3.0.M2]
    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-08-21 00:37:43.696 TRACE 49439 --- [      elastic-5] o.s.h.s.r.ReactorHttpHandlerAdapter      : [78484955] Handling completed
spencergibb commented 5 years ago

My guess is that this can be replicated without Spring Could, just Spring Boot. application/json;charset=UTF-8 try without charset.

mike-audi commented 5 years ago

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
spencergibb commented 5 years ago

Can you try without any spring cloud?

mike-audi commented 5 years ago

Without spring cloud works

spencergibb commented 5 years ago

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.

spencergibb commented 4 years ago

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.