You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/08 03:16:36 UTC

[GitHub] [dubbo] GreatBareBear opened a new issue, #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id

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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] GreatBareBear commented on issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id

Posted by GitBox <gi...@apache.org>.
GreatBareBear commented on issue #10286:
URL: https://github.com/apache/dubbo/issues/10286#issuecomment-1181336778

   另外,dubbo-serialization-kryo需要手动排除dubbo-common,否则启动时会报错误:java.lang.IllegalStateException: Duplicate extension ...


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] ygmyth commented on issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id

Posted by "ygmyth (via GitHub)" <gi...@apache.org>.
ygmyth commented on issue #10286:
URL: https://github.com/apache/dubbo/issues/10286#issuecomment-1501490661

   > 我serialization配置的是kryo, 为什么会提示id:2的hessian2序列化错误呢
   
   找到原因了吗,最后怎么解决的?


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] GreatBareBear commented on issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id

Posted by GitBox <gi...@apache.org>.
GreatBareBear commented on issue #10286:
URL: https://github.com/apache/dubbo/issues/10286#issuecomment-1180033613

   我provider配置的是kryo, 为什么会提示id:2的hessian2序列化呢


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] GreatBareBear closed issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id

Posted by GitBox <gi...@apache.org>.
GreatBareBear closed issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id
URL: https://github.com/apache/dubbo/issues/10286


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] GreatBareBear commented on issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id

Posted by GitBox <gi...@apache.org>.
GreatBareBear commented on issue #10286:
URL: https://github.com/apache/dubbo/issues/10286#issuecomment-1178584843

   随便改了一下配置,加了一个accesslog参数就又可以了,感觉是zk在搞鬼呢。。
    <dubbo:protocol name="dubbo" port="${SERVER.PORT.DUBBO}" threads="100" accesslog="true" serialization="kryo" optimizer="com.mobee.slot.rpc.dubbo.kryo.SerializationOptimizerImpl"/>


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] GreatBareBear closed issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id

Posted by GitBox <gi...@apache.org>.
GreatBareBear closed issue #10286: Unexpected serialization id:2 received from network, please check if the peer send the right id
URL: https://github.com/apache/dubbo/issues/10286


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org