Dubbo错误排查——com.alibaba.dubbo.rpc.RpcException—— Invoke remote method timeout

本人花费半年的时间总结的《Java面试指南》已拿腾讯等大厂offer,已开源在github ,欢迎star!

本文GitHub https://github.com/OUYANGSIHAI/JavaInterview 已收录,这是我花了6个月总结的一线大厂Java面试总结,本人已拿大厂offer,欢迎star

原文链接:blog.ouyangsihai.cn >> Dubbo错误排查——com.alibaba.dubbo.rpc.RpcException—— Invoke remote method timeout

一、错误信息

客户端错误:


com.alibaba.dubbo.rpc.RpcException: Invoke remote method timeout. method: searchUser, provider:
...

cause: Waiting server-side response timeout by scan timer. start time: 2015-06-17 14:46:49.979, end time: 2015-06-17 14:46:51.002, client elapsed: 44 ms, server elapsed: 959 ms, timeout: 1000 ms, request: Request

...

服务端警告:


2015-06-17 14:46:52,454 WARN  [DubboServerHandler-172.25.6.248:20882-thread-2] (ChannelEventRunnable.java:84) -  [DUBBO] ChannelEventRunnable handle RECEIVED operation error

com.alibaba.dubbo.remoting.RemotingException: Failed to send message Response [id=0, version=2.0.0, status=20, event=false, error=null, result=RpcResult [result=com.ceair.cesso.dto.SearchUserResult@7ba2a1d2, exception=null]] to /172.25.3.91:50849, cause: null
    at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:108)
    at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:51)
    at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:171)
    at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52)
    at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.nio.channels.ClosedChannelException
    at org.jboss.netty.channel.socket.nio.NioWorker.cleanUpWriteBuffer(NioWorker.java:643)
    at org.jboss.netty.channel.socket.nio.NioWorker.writeFromUserCode(NioWorker.java:370)
    at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:137)
    at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:76)
    at org.jboss.netty.channel.Channels.write(Channels.java:632)
    at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:70)
    at com.alibaba.dubbo.remoting.transport.netty.NettyHandler.writeRequested(NettyHandler.java:99)
    at org.jboss.netty.channel.Channels.write(Channels.java:611)
    at org.jboss.netty.channel.Channels.write(Channels.java:578)
    at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:251)
    at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:98)
    ... 7 more

二、原因分析

客户端日志可以看到是超时错误

接着给出信息:客户端、服务端花费的时间;

在看服务端,是通道被关闭,无法发送信息。

整体看起来,就是超时了,客户端没有得到返回信息,服务端不能发送信息。

是超时的配置

检查客户端、服务端的超时配置;发现客户端的超时时间没有设置,设置为一个较长时间,就可以了。

超时设置方法:

原文地址:https://sihai.blog.csdn.net/article/details/80152282

本人花费半年的时间总结的《Java面试指南》已拿腾讯等大厂offer,已开源在github ,欢迎star!

本文GitHub https://github.com/OUYANGSIHAI/JavaInterview 已收录,这是我花了6个月总结的一线大厂Java面试总结,本人已拿大厂offer,欢迎star

原文链接:blog.ouyangsihai.cn >> Dubbo错误排查——com.alibaba.dubbo.rpc.RpcException—— Invoke remote method timeout


 上一篇
tomcat运行报错Failed to start component 【StandardEngine【Catalina】.StandardHost【localhost】. tomcat运行报错Failed to start component 【StandardEngine【Catalina】.StandardHost【localhost】.
一、问题tomcat运行报错Failed to start component [StandardEngine[Catalina].StandardHost[localhost]. 多半情况是找不到jar包 二、解决办法1、如果项目是直接在
2021-04-04
下一篇 
solr异常--Expected mime type application,octet-stream but got text,html. solr异常--Expected mime type application,octet-stream but got text,html.
一、错误信息 Exception in thread "main" org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime
2021-04-04