spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.52k stars 3.32k forks source link

gateway integration dubbo routing failed(gateway整合dubbo路由失败) #2644

Closed TOP-LH closed 1 year ago

TOP-LH commented 2 years ago

Springcloud: Hoxton.SR9 Springboot: 2.3.7.RELEASE dubbo-spring-boot-starter: 3.0.8

DUBBO3添加了应用级注册的功能, 如果我开启了应用级注册, 并且开启了spring.cloud.gateway.discovery.locator.enabled=true 则gateway会将DUBBO服务也视为我的服务然后进行路由, 最后导致请求失败 DUBBO3 adds application-level registration, if I enable application-level registration and enable spring.cloud.gateway.discovery.locator.enabled=true then the gateway will treat the DUBBO service as my service and route it, resulting in a failed request

注册中心截图 Registration Center Screenshot 1655607363562

网关报错信息 Gateway error message

[c7c94c5d-303940]  500 Server Error for HTTP GET "/wison-subcontract/system/dict/group/cache/all"
java.lang.IllegalArgumentException: invalid version format: UNSUPPORTED
    at io.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:120)
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
    |_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ org.springframework.boot.actuate.metrics.web.reactive.server.MetricsWebFilter [DefaultWebFilterChain]
    |_ checkpoint ⇢ HTTP GET "/wison-subcontract/system/dict/group/cache/all" [ExceptionHandlingWebHandler]
Stack trace:
        at io.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:120)
        at io.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:77)
        at io.netty.handler.codec.http.HttpResponseDecoder.createMessage(HttpResponseDecoder.java:126)
        at io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:250)
        at io.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:225)
        at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:508)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:447)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
        at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795)
        at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480)
        at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:853)
spencergibb commented 1 year ago

Hoxton is long unsupported. Please update to 2021.0.6 or 2022.0.0

spring-cloud-issues commented 1 year ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-cloud-issues commented 1 year 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.