开发者社区 > 云原生 > 正文

gateway integration dubbo routing failed(gateway整合

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

提问53.jpeg

网关报错信息 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.(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.(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)

原提问者GitHub用户TOP-LH

展开
收起
大圣东游 2023-05-11 19:01:41 177 0
1 条回答
写回答
取消 提交回答
  • dubbo 服务和 Spring 在同一个 namespace、group 下导致的?可以尝试调整 dubbo 侧的 namespace 或这 spring 应用的 namespace,把地址空间隔离开。

    原回答者GitHub用户chickenlj

    2023-05-12 10:51:32
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
Dubbo开源现状与2.7规划 立即下载
Dubbo分布式服务治理实战 立即下载
《Dubbo 3.0 前瞻》 立即下载