Closed GreatBareBear closed 2 years ago
我serialization配置的是kryo, 为什么会提示id:2的hessian2序列化错误呢
另外,dubbo-serialization-kryo需要手动排除dubbo-common,否则启动时会报错误:java.lang.IllegalStateException: Duplicate extension ...
我serialization配置的是kryo, 为什么会提示id:2的hessian2序列化错误呢
找到原因了吗,最后怎么解决的?
有可能是因为两边机器上的代码不一致。
使用serialization="kryo"序列化配置时发生错误,消费者和生产者都部署在同一台设备上时,访问不会报错,否则,调用消费接口时就会发生异常,去掉serialization="kryo"序列化配置可以正常访问,我不知所错了,请问这是什么问题呢,谢谢!
操作系统:Windows10 Dubbo版本:3.0.9 JDK版本:JDK17
2022-07-08 10:08:00,976 [DubboServerHandler-192.168.100.249:28102-thread-14] WARN o.a.d.r.p.d.DecodeableRpcInvocation - [DUBBO] Decode rpc invocation failed: Unexpected serialization id:2 received from network, please check if the peer send the right id., dubbo version: 3.0.9, current host: 192.168.100.249 java.io.IOException: Unexpected serialization id:2 received from network, please check if the peer send the right id. at org.apache.dubbo.remoting.transport.CodecSupport.checkSerialization(CodecSupport.java:178) at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:137) at org.apache.dubbo.rpc.protocol.dubbo.DecodeableRpcInvocation.decode(DecodeableRpcInvocation.java:92) at org.apache.dubbo.remoting.transport.DecodeHandler.decode(DecodeHandler.java:57) at org.apache.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:44) at org.apache.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:57) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:41) at java.base/java.lang.Thread.run(Thread.java:833)
Consumer配置: