报错信息:
org.apache.dubbo.rpc.RpcException: Invoke remote method timeout. method:
getEasybuyUserListByMap, provider: dubbo://192.168.52.1:20880/com.buy.service.
easybuyUser.EasybuyUserService?anyhost=true&application=buy-user-consumer&bean.
name=ServiceBean:com.buy.service.easybuyUser.EasybuyUserService&check=false&
deprecated=false&dubbo=2.0.2&dynamic=true&generic=false&interface=com.buy.
service.easybuyUser.EasybuyUserService&lazy=false&methods=
queryEasybuyUserPageByMap,getEasybuyUserListByMap,itriptxModifyEasybuyUser,
itriptxAddEasybuyUser,getEasybuyUserCountByMap,getEasybuyUserById,
itriptxDeleteEasybuyUserById&pid=19876&qos.enable=false®ister=true®ister.
ip=192.168.52.1&release=2.7.3&remote.application=buy-user-provider&revision=1.0-
SNAPSHOT&side=consumer&sticky=false×tamp=1630382237309, cause: org.apache.
dubbo.remoting.TimeoutException: Waiting server-side response timeout by scan
timer. start time: 2021-08-31 11:57:42.790, end time: 2021-08-31 11:57:43.812,
client elapsed: 75 ms, server elapsed: 947 ms, timeout: 1000 ms, request:
Request [id=0, version=2.0.2, twoway=true, event=false, broken=false, data=
RpcInvocation [methodName=getEasybuyUserListByMap, parameterTypes=[interface
java.util.Map], arguments=[{mobile=15239908002}], attachments={path=com.buy.
service.easybuyUser.EasybuyUserService, interface=com.buy.service.easybuyUser.
EasybuyUserService, version=0.0.0}]], channel: /192.168.52.1:55674 -> /192.168
.52.1:20880 at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke(
AsyncToSyncInvoker.java:63) ~[dubbo-2.7.3.jar:2.7.3] Caused by: java.util.
concurrent.ExecutionException: org.apache.dubbo.remoting.TimeoutException:
Waiting server-side response timeout by scan timer. start time: 2021-08-31 11:57
:42.790, end time: 2021-08-31 11:57:43.812, client elapsed: 75 ms, server
elapsed: 947 ms, timeout: 1000 ms, request: Request [id=0, version=2.0.2, twoway
=true, event=false, broken=false, data=RpcInvocation [methodName=
getEasybuyUserListByMap, parameterTypes=[interface java.util.Map], arguments=[{
mobile=15239908002}], attachments={path=com.buy.service.easybuyUser.
EasybuyUserService, interface=com.buy.service.easybuyUser.EasybuyUserService,
version=0.0.0}]], channel: /192.168.52.1:55674 -> /192.168.52.1:20880 at java.
util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) ~[na:1.8
.0_152] at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:
1915) ~[na:1.8.0_152] at org.apache.dubbo.rpc.protocol.AsyncToSyncInvoker.invoke
(AsyncToSyncInvoker.java:56) ~[dubbo-2.7.3.jar:2.7.3] ... 72 common frames
omittedCaused by: org.apache.dubbo.remoting.TimeoutException: Waiting server-
side response timeout by scan timer. start time: 2021-08-31 11:57:42.790, end
time: 2021-08-31 11:57:43.812, client elapsed: 75 ms, server elapsed: 947 ms,
timeout: 1000 ms, request: Request [id=0, version=2.0.2, twoway=true, event=
false, broken=false, data=RpcInvocation [methodName=getEasybuyUserListByMap,
parameterTypes=[interface java.util.Map], arguments=[{mobile=15239908002}],
attachments={path=com.buy.service.easybuyUser.EasybuyUserService, interface=com.
buy.service.easybuyUser.EasybuyUserService, version=0.0.0}]], channel: /192.168
.52.1:55674 -> /192.168.52.1:20880 at org.apache.dubbo.remoting.exchange.support
.DefaultFuture.doReceived(DefaultFuture.java:189) ~[dubbo-2.7.3.jar:2.7.3] at
org.apache.dubbo.remoting.exchange.support.DefaultFuture.received(DefaultFuture.
java:153) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.remoting.exchange.support
.DefaultFuture$TimeoutCheckTask.run(DefaultFuture.java:252) ~[dubbo-2.7.3.jar:
2.7.3] at org.apache.dubbo.common.timer.HashedWheelTimer$HashedWheelTimeout.
expire(HashedWheelTimer.java:648) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.
common.timer.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.
java:727) ~[dubbo-2.7.3.jar:2.7.3] at org.apache.dubbo.common.timer.
HashedWheelTimer$Worker.run(HashedWheelTimer.java:449) ~[dubbo-2.7.3.jar:2.7.3]
... 1 common frames omitted
        导致原因:

        看到错误信息日志,可以知道是超时错误,再往下看,看到服务端即消费者端通道已经关闭。此时我们需要设置一个超时时间。

        消费者端:
dubbo: application: name: buy-user-consumer registry: address: zookeeper://
127.0.0.1:2181 consumer: timeout: 50000
        提供者端:
dubbo: application: name: buy-user-provider registry: address: zookeeper://
127.0.0.1:2181 protocol: port: 20880 provider: timeout: 50000
        这样就完成了。

技术
©2019-2020 Toolsou All rights reserved,
TypeScript:函数类型接口8道大厂指针笔试题让你秒杀指针!!!MySQL 日期时间加减mysql 查询条件之外的数据_mysql 查询符合条件的数据查linux的操作系统版本,如何查看Linux操作系统版本?将String类型转换成Map数据类型使用uuid做MySQL主键,被老板,爆怼一顿C语言中的字符串函数和字符函数linux服务器中毒排查--基础篇C# ASCII码字符转换