You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "llx206 (GitHub)" <gi...@apache.org> on 2018/12/04 07:01:38 UTC
[GitHub] [incubator-dubbo] llx206 opened issue #2179: Kryo serialization fails when the service is both a provider and a consumer(新版本解决了吗?)
- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
### Environment
* Dubbo version: 2.6.2
* Operating System version:Red Hat Enterprise Linux Server release 6.6 (Santiago)
* Java version: 1.8
### Step to reproduce this issue
The execution method is as follows:
1. mvn install all the project.
2. testissue2116\summary-server run TestSummaryServer to start summary-server service
![image](https://user-images.githubusercontent.com/39985288/43629693-905c4a8a-9730-11e8-8083-fb58bfa0b08a.png)
3. testissue2116\dubbo-kryo-server run TestServer to start dubbo-kryo-server service
![image](https://user-images.githubusercontent.com/39985288/43629706-977e8382-9730-11e8-8b8e-83c02ca7fbb6.png)
![image](https://user-images.githubusercontent.com/39985288/43629712-9d315020-9730-11e8-82e8-8edd6aa2a087.png)
![image](https://user-images.githubusercontent.com/39985288/43629728-a6a7d318-9730-11e8-93ed-dd7c9a973aef.png)
4. testissue2116\dubbo-kryo-client run SimpleClient to call dubbo-kryo-server
![image](https://user-images.githubusercontent.com/39985288/43629750-b3b62794-9730-11e8-9100-6ade581a6237.png)
Pls. provide [GitHub address] to reproduce this issue.
git@github.com:llx206/testKryo.git
### Expected Result
What do you expected from the above steps?
### Actual Result
What is actually happen?
If there is an exception, please attach the exception trace:
![image](https://user-images.githubusercontent.com/39985288/43629675-853f9b52-9730-11e8-9234-35ce9cfed75c.png)
```
Just put your stack trace here!
```
```
I found the problem to be the case when serializing using the kryo protocol. The above exception occurs when the service is both a provider and a consumer. Please help me to see it, thank you very much!
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] Bricks-Man commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(新版本解决了吗?)
Posted by "Bricks-Man (GitHub)" <gi...@apache.org>.
Well,It's not Dubbo's bug.It's a bug of how you use it.In your summary-server module,SummaryUser and SummaryPage has been registered as 55, 56.So in your dubbo-kryo-server module,SummaryUser and SummaryPage has been registered as 55, 56.But your dubbo-kryo-server module will regist User and Page as 57,58 when you use Userservice.And your dubbo-kryo-client just regist User and Page as 55,56.So you will get exception 'Encountered unregistered class ID: 57'.You just need regist SummaryUser and SummaryPage in your dubbo-kryo-client moudle.
If you use kryo,you must ensure each jvm has same registered classes list.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] llx206 commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(新版本解决了吗?)
Posted by "llx206 (GitHub)" <gi...@apache.org>.
> * [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
> * [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.
>
> ### Environment
> * Dubbo version: 2.6.2
> * Operating System version:Red Hat Enterprise Linux Server release 6.6 (Santiago)
> * Java version: 1.8
>
> ### Step to reproduce this issue
> The execution method is as follows:
>
> 1. mvn install all the project.
> 2. testissue2116\summary-server run TestSummaryServer to start summary-server service
> ![image](https://user-images.githubusercontent.com/39985288/43629693-905c4a8a-9730-11e8-8083-fb58bfa0b08a.png)
> 3. testissue2116\dubbo-kryo-server run TestServer to start dubbo-kryo-server service
> ![image](https://user-images.githubusercontent.com/39985288/43629706-977e8382-9730-11e8-8b8e-83c02ca7fbb6.png)
> ![image](https://user-images.githubusercontent.com/39985288/43629712-9d315020-9730-11e8-82e8-8edd6aa2a087.png)
> ![image](https://user-images.githubusercontent.com/39985288/43629728-a6a7d318-9730-11e8-93ed-dd7c9a973aef.png)
> 4. testissue2116\dubbo-kryo-client run SimpleClient to call dubbo-kryo-server
> ![image](https://user-images.githubusercontent.com/39985288/43629750-b3b62794-9730-11e8-9100-6ade581a6237.png)
>
> Pls. provide [GitHub address] to reproduce this issue.
> [git@github.com](mailto:git@github.com):llx206/testKryo.git
>
> ### Expected Result
> What do you expected from the above steps?
>
> ### Actual Result
> What is actually happen?
> If there is an exception, please attach the exception trace:
> ![image](https://user-images.githubusercontent.com/39985288/43629675-853f9b52-9730-11e8-9234-35ce9cfed75c.png)
>
> ```
> Just put your stack trace here!
> ```
> ```
> I found the problem to be the case when serializing using the kryo protocol. The above exception occurs when the service is both a provider and a consumer. Please help me to see it, thank you very much!
> ```
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] ZhuoSiChen commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(Help Help!!!!)
Posted by "ZhuoSiChen (GitHub)" <gi...@apache.org>.
@llx206
能否给个github 的demo我本地运行下。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-dubbo] ZhuoSiChen commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(Help Help!!!!)
Posted by "ZhuoSiChen (GitHub)" <gi...@apache.org>.
能否给个github 的demo我本地运行下。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-dubbo] ZhuoSiChen commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(Help Help!!!!)
Posted by "ZhuoSiChen (GitHub)" <gi...@apache.org>.
建议你还是升级dubbo吧,因为在2.6.1版本中,创建KryoObjectInput这个的Kryo对象会把SerializableClassRegistry里的registrations里采用的是Set集合来缓存类,全都注册进Kryo对象中,所以导致在DefaultClassResolver里的idToRegistration无法和客户端idToRegistration无法对齐。
在2.6.3里采用registrations用了Map<>来缓存类 了。
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-dubbo] llx206 closed issue #2179: Kryo serialization fails when the service is both a provider and a consumer(新版本解决了吗?)
Posted by "llx206 (GitHub)" <gi...@apache.org>.
[ issue closed by llx206 ]
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(新版本解决了吗?)
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Pls focus on https://github.com/apache/incubator-dubbo/issues/2881
@Bricks-Man
This is a bug of dubbo.
We provide a way for the registry class, so maintaining the relationship of the class id is what we have to do.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] carryxyh closed issue #2179: Kryo serialization fails when the service is both a provider and a consumer(新版本解决了吗?)
Posted by "carryxyh (GitHub)" <gi...@apache.org>.
[ issue closed by carryxyh ]
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] llx206 commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(Help Help!!!!)
Posted by "llx206 (GitHub)" <gi...@apache.org>.
@ZhuoSiChen ,升级到2.6.3后,使用kryo序列化协议,客户端调用还是会出现
![image](https://user-images.githubusercontent.com/39985288/46007023-8c63d300-c0eb-11e8-9a97-e87a5781003e.png),请帮忙看下吧,多谢!
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-dubbo] Bricks-Man commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(新版本解决了吗?)
Posted by "Bricks-Man (GitHub)" <gi...@apache.org>.
> Pls focus on #2881
>
> @Bricks-Man
> This is a bug of dubbo.
> We provide a way for the registry class, so maintaining the relationship of the class id is what we have to do.
OK.Thx
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] Veryfirefly commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(Help Help!!!!)
Posted by "Veryfirefly (GitHub)" <gi...@apache.org>.
When serializing kryo in my project, the consumer call will also report an error.
No provider available for the service com.lewanwuxian.service.AccountService:1.0 from registry 192.168.1.3:2181 on the consumer 192.168.1.29 using the dubbo version 2.6.3. Please check if the providers have been started and registered.
My provider and consumer version of dubbo is 2.6.3.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] llx206 commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(Help Help!!!!)
Posted by "llx206 (GitHub)" <gi...@apache.org>.
@ZhuoSiChen ,gitHub地址:https://github.com/llx206/testKryo
操作步骤见最开始处:https://github.com/apache/incubator-dubbo/issues/2179#issue-347287850
大神帮忙看下是什么问题吧,非常感谢!!!
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [incubator-dubbo] llx206 commented on issue #2179: Kryo serialization fails when the service is both a provider and a consumer(Help Help!!!!)
Posted by "llx206 (GitHub)" <gi...@apache.org>.
非常感谢,我试一下看看!
在 2018-09-05 02:10:57,"Muxin" <no...@github.com> 写道:
建议你还是升级dubbo吧,因为在2.6.1版本中,创建KryoObjectInput这个的Kryo对象会把SerializableClassRegistry里的registrations里采用的是Set集合来缓存类,全都注册进Kryo对象中,所以导致在DefaultClassResolver里的idToRegistration无法和客户端idToRegistration无法对齐。
在2.6.3里采用registrations用了Map<>来缓存类 了。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/2179 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org