dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.9k stars 2.06k forks source link

dubbox 2.8.4版本作为消费者调用2.6.3及之后的版本报Unknown result flag, expect '0' '1' '2', get 4 #403

Closed yanbospark closed 5 years ago

yanbospark commented 5 years ago
  1. 公司准备将dubbox 回到dubbo 2.7.0之后的版本。首先遇到了序列化问题,通过 这个https://github.com/dangdangdotcom/dubbox/commit/39c56bbfab80f012b78517c47eab0c71c92c9520 解决了序列化问题。

2.然后遇到另外一个问题,异常堆栈信息如下:

java.io.IOException: Unknown result flag, expect '0' '1' '2', get 4 at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:103) at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:117) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:98) at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:134) at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:95) at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:46) at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:134) at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268) at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255) at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

问题描述: 1.消费端是dubbox版本2.8.4(已解决序列化问题),调用提供者 dubbo 2.6.3之前的都能正常调用, 而在dubbo 2.6.3之后的版本都是上面的错误。 2.考虑到会不会是dubbo 新版本的问题, 于是本人将消费端换成dubbo 2.6.0 调用 提供端 2.6.3 的版本,发现是调用成功的。

不知道是否有同仁在升级dubbo的过程中有遇到这个问题? 请官方小伙伴出来解答一下?

wu-ernest commented 5 years ago

可以参考一下这篇博客,声明一下,这不是我写的。 https://blog.csdn.net/weihao9939/article/details/88749531

yanbospark commented 5 years ago

可以参考一下这篇博客,声明一下,这不是我写的。 https://blog.csdn.net/weihao9939/article/details/88749531

感谢,这个追源码已经解决了,跟你发的这个链接是一样的处理方案,还是很感谢大佬的支持。