首先上报错异常图
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®ister.ip=ip&remote.timestamp=1566739287663&revision=1.0.0&serialization=kryo&side=consumer&status=server×tamp=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>
版权声明:本文为qq_37310913原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。