kryo-serializers引起的dubbo调用超时

首先上报错异常图

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Sun Aug 25 21:29:03 CST 2019
There was an unexpected error (type=Internal Server Error, status=500).
Failed to invoke the method getLog in the service com.***.api.***Service. Tried 3 times of the providers [ip:20881] (1/1) from the registry 127.0.0.1:2181 on the consumer ip using the dubbo version 2.6.2. Last error is: Invoke remote method timeout. method: getLog, provider: dubbo://ip:20881/com.***.api.***Service?anyhost=true&application=***-***-consumer&check=false&dubbo=2.6.2&generic=false&interface=com.***.api.***Service&methods=***methods&pid=12976&register.ip=ip&remote.timestamp=1566739287663&revision=1.0.0&serialization=kryo&side=consumer&status=server&timestamp=1566739385416&version=1.0.0, cause: Waiting server-side response timeout. start time: 2019-08-25 21:29:02.773, end time: 2019-08-25 21:29:03.774, client elapsed: 0 ms, server elapsed: 1001 ms, timeout: 1000 ms, request: Request [id=7, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=getLog, parameterTypes=[], arguments=[], attachments={path=com.***.api.***Service, interface=com.***.api.***Service, version=1.0.0}]], channel: /ip:54703 -> /ip:20881

错误的地方在下面:

注意exclusion标签,它把objenesis给排除了,导致远程调用的时候无法序列化但是没有显式的抛出异常,删除exclusion就没错了

<dependency>
    <groupId>de.javakaffee</groupId>
        <artifactId>kryo-serializers</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>objenesis</artifactId>
                    <groupId>org.objenesis</groupId>
                </exclusion>
            </exclusions>
</dependency>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值