spring cloud gateway报错Only one connection receive subscriber allowed

原创 2019-07-08 11:06 阅读(4824)次
spring cloud网关报错:
reactor.core.Exceptions$ErrorCallbackNotImplemented: java.lang.IllegalStateException: Only one connection receive subscriber allowed.
Caused by: java.lang.IllegalStateException: Only one connection receive subscriber allowed.
    at reactor.ipc.netty.channel.FluxReceive.startReceiver(FluxReceive.java:279) ~[reactor-netty-0.7.9.RELEASE.jar:0.7.9.RELEASE]
    at reactor.ipc.netty.channel.FluxReceive.subscribe(FluxReceive.java:126) ~[reactor-netty-0.7.9.RELEASE.jar:0.7.9.RELEASE]
    at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at reactor.ipc.netty.ByteBufFlux.subscribe(ByteBufFlux.java:242) ~[reactor-netty-0.7.9.RELEASE.jar:0.7.9.RELEASE]
    at reactor.core.publisher.FluxPeek.subscribe(FluxPeek.java:83) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at reactor.ipc.netty.ByteBufFlux.subscribe(ByteBufFlux.java:242) ~[reactor-netty-0.7.9.RELEASE.jar:0.7.9.RELEASE]
    at reactor.core.publisher.FluxMap.subscribe(FluxMap.java:62) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at reactor.core.publisher.Flux.subscribe(Flux.java:6877) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at reactor.core.publisher.Flux.subscribeWith(Flux.java:7044) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at reactor.core.publisher.Flux.subscribe(Flux.java:6870) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at reactor.core.publisher.Flux.subscribe(Flux.java:6834) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at reactor.core.publisher.Flux.subscribe(Flux.java:6777) ~[reactor-core-3.1.9.RELEASE.jar:3.1.9.RELEASE]
    at com.surfilter.gateway.filters.PostFilter.lambda$apply$1(PostFilter.java:43) ~[classes/:na]

spring boot版本是2.0.5.RELEASE

spring cloud版本是Finchley.SR1

原因是gateway读取过responsebody,body只能读取一次,怀疑用的版本太低了,将这两个版本升到

2.1.4.RELEASE

Greenwich.SR1

就可以了