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
网关报错信息 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
dubbo 服务和 Spring 在同一个 namespace、group 下导致的?可以尝试调整 dubbo 侧的 namespace 或这 spring 应用的 namespace,把地址空间隔离开。
原回答者GitHub用户chickenlj
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。