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

dubbo使用triple协议,消费者无法连接到生产者,消费者调用的时候就报错,而且每次启动会有说找

jdk:19 dubbo:3.2.0-beta5 dubbo-spring-boot-starter:3.2.0-beta5 注册中心nacos:3.2.0-beta5

生产者配置文件:

server.port=8082

spring.application.name=provider

dubbo.application.name=provider dubbo.registry.address=nacos://192.168.220.128:8848 dubbo.protocol.port=-1 dubbo.provider.protocol=tri dubbo.application.metadata-type=remote

消费者配置文件:

server.port=8081

spring.application.name=consumer

dubbo.application.name=consumer dubbo.registry.address=nacos://192.168.220.128:8848 dubbo.protocol.port=-1 dubbo.consumer.protocol=tri

报错信息: 生产者:

[DUBBO] The connection of /192.168.189.1:53173 -> /192.168.189.1:50051 is disconnected., dubbo version: 3.2.0-beta.5, current host: 192.168.189.1 [DUBBO] The connection of /192.168.189.1:53188 -> /192.168.189.1:50051 is disconnected., dubbo version: 3.2.0-beta.5, current host: 192.168.189.1 [DUBBO] The connection of /192.168.189.1:53191 -> /192.168.189.1:50051 is disconnected., dubbo version: 3.2.0-beta.5, current host: 192.168.189.1

消费者:

org.apache.dubbo.rpc.StatusRpcException: CANCELLED : Canceled by remote peer, errorCode=8 at org.apache.dubbo.rpc.TriRpcStatus.asException(TriRpcStatus.java:214) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5] Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at the following site(s): *__checkpoint ⇢ HTTP POST "/test?username=123" [ExceptionHandlingWebHandler] Original Stack Trace: at org.apache.dubbo.rpc.TriRpcStatus.asException(TriRpcStatus.java:214) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5] at org.apache.dubbo.rpc.protocol.tri.call.UnaryClientCallListener.onClose(UnaryClientCallListener.java:51) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5] at org.apache.dubbo.rpc.protocol.tri.call.TripleClientCall.onComplete(TripleClientCall.java:110) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5] at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.finishProcess(TripleClientStream.java:256) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5] at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.lambda$cancelByRemote$3(TripleClientStream.java:475) ~[dubbo-3.2.0-beta.5.jar:3.2.0-beta.5] at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:102) ~[dubbo-common-3.2.0-beta.5.jar:3.2.0-beta.5] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na] at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) ~[dubbo-common-3.2.0-beta.5.jar:3.2.0-beta.5] at java.base/java.lang.Thread.run(Thread.java:1589) ~[na:na]

原提问者GitHub用户soiz-tor

展开
收起
大圣东游 2023-05-11 15:47:20 417 0
1 条回答
写回答
取消 提交回答
  • provider 设置了 dubbo.application.metadata-type=remote,先看一下nacos是否有相关元数据,没有就需要开启nacos作为元数据中心。确保元数据已正常上报至元数据 中心

    原回答者GitHub用户yuchang01

    2023-05-12 10:21:01
    赞同 展开评论 打赏

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

相关电子书

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