GreatBareBear opened a new issue, #10286:
URL: https://github.com/apache/dubbo/issues/10286
使用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配置:
<dubbo:application name="${SERVER.NAME}_S${SERVER.ID}"/>
<dubbo:registry cluster="failover" client="curator" protocol="zookeeper"
address="${ZOOKEEPER.ADDRESS}" username="${ZOOKEEPER.USERNAME}"
password="${ZOOKEEPER.PASSWORD}">
<dubbo:parameter key="qos.enable" value="true"/>
<dubbo:parameter key="qos.port" value="${SERVER.PORT.QOS}"/>
</dubbo:registry>
<dubbo:consumer check="true"/>
<dubbo:reference id="rpcService"
interface="com.xxx.rpc.dubbo.api.IRpcService"/>
Provider配置:
<dubbo:application name="${SERVER.NAME}_S${SERVER.ID}"/>
<dubbo:registry cluster="failover" client="curator" protocol="zookeeper"
address="${ZOOKEEPER.ADDRESS}" username="${ZOOKEEPER.USERNAME}"
password="${ZOOKEEPER.PASSWORD}">
<dubbo:parameter key="qos.enable" value="true"/>
<dubbo:parameter key="qos.port" value="${SERVER.PORT.QOS}"/>
</dubbo:registry>
<dubbo:protocol name="dubbo" port="${SERVER.PORT.DUBBO}" threads="100"
serialization="kryo"
optimizer="com.xxx.rpc.dubbo.kryo.SerializationOptimizerImpl"/>
<dubbo:provider server="netty" client="netty" cluster="failover"
loadbalance="random" timeout="10000" retries="2"/>
<bean id="rpcService" class="com.xxx.rpc.RpcServiceImpl"/>
<dubbo:service interface="com.xxx.rpc.dubbo.api.IRpcService"
ref="rpcService"/>
消费者和生产者在同一台设备上时,使用serialization="kryo"序列化配置一切正常;否则,使用serialization="kryo"序列化配置就会发生异常。
--
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]