luger1990 opened a new issue #9790:
URL: https://github.com/apache/dubbo/issues/9790


   使用spring boot + dubbo3 + triple协议,消费者端调用报错:
   Received inconsistent serialization type from client, reject to deserialize! 
Expected:hessian2 Actual:
   
   provider端配置如下:
   ```
   server:
     port: 8881
   spring:
     application:
       name: dubbo-grpc-provider
     profiles:
       active: dev
     main:
       allow-bean-definition-overriding: true
   dubbo:
     application:
       name: ${spring.application.name}
       id: ${spring.application.name}
       register-mode: instance
     registry:
       address: nacos://127.0.0.1:8848
     scan:
       base-packages: me.luger
     protocol:
       name: tri
       port: 20880
       accesslog: true
     monitor:
       protocol: registry
   ```
   
   consumer端配置如下:
   ```
   server:
     port: 8882
   spring:
     application:
       name: dubbo-grpc-consumer
     profiles:
       active: dev
     main:
       allow-bean-definition-overriding: true
   dubbo:
     application:
       name: ${spring.application.name}
       id: ${spring.application.name}
       register-mode: instance
     registry:
       address: nacos://127.0.0.1:8848
     cloud:
       subscribed-services: dubbo-grpc-provider
     consumer:
       timeout: 3000
   ```
   
   详细报错如下:
   
   > org.apache.dubbo.rpc.RpcException: Received inconsistent serialization 
type from client, reject to deserialize! Expected:hessian2 Actual:taylor
   >    at 
org.apache.dubbo.rpc.protocol.tri.AbstractClientStream.getThrowableFromTrailers(AbstractClientStream.java:188)
 ~[dubbo-3.0.6.jar:3.0.6]
   >    at 
org.apache.dubbo.rpc.protocol.tri.UnaryClientStream$ClientUnaryInboundTransportObserver.onError(UnaryClientStream.java:86)
 ~[dubbo-3.0.6.jar:3.0.6]
   >    at 
org.apache.dubbo.rpc.protocol.tri.UnaryClientStream$ClientUnaryInboundTransportObserver.lambda$onComplete$0(UnaryClientStream.java:56)
 ~[dubbo-3.0.6.jar:3.0.6]
   >    at 
org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:99)
 ~[dubbo-3.0.6.jar:3.0.6]
   >    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[na:1.8.0_191]
   >    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[na:1.8.0_191]
   >    at 
org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41)
 ~[dubbo-3.0.6.jar:3.0.6]
   >    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
   
   
   ps:还有个问题,为什么消费者和提供者都启动之后再nacos中只有生产者中可以看到数据。如下图
   
![image](https://user-images.githubusercontent.com/2096878/158414378-b03e9c79-7c9b-4eb5-a42c-b01a427c5300.png)
   
![image](https://user-images.githubusercontent.com/2096878/158414461-e2a929ef-c182-43e9-a9ce-13421efdf526.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to