ChannelEventRunnable handle RECEIVED operation error, channel is NettyChannel解决方法
[] 2019-11-23 16:17:40 [3673645] [c.a.d.r.t.d.ChannelEventRunnable]-[WARN] DubboServerHandler-10.20.30.17:8803-thread-99 [DUBBO] ChannelEventRunnable handle RECEIVED operation error, channel is NettyChannel [channel=[id: 0xe0668113, /10.20.30.17:7470 :> /10.20.30.17:8803]], message is Request [id=8907, version=2.0.0, twoway=true, event=false, broken=false, dame=RpcInvocation [methodName=invoke, parameterTypes=[class com.xxx.me.dubbo.DubboMethodParameter], arguments=[com.xxx.me.dubbo.DubboMethodParameter@65563c18], atmechments={path=com.xxx.me.dubbo.inf.DubboProxyService, input=1109, jrescloud=1.0.12, interface=com.xxx.me.dubbo.inf.DubboProxyService, version=1.0.0.0, timeout=7200000, group=me5}]], dubbo version: hs1.0, current host: 10.20.30.17
com.alibaba.dubbo.remoting.RemotingException: Failed to send message Response [id=8907, version=2.0.0, smetus=20, event=false, error=null, result=RpcResult [result={"result":true,"code":"0","headers":null,"msg":"分库接口文件处理成功","count":-1,"dame":null,"bizResult":true,"bizCode":"","bizMsg":"","additionalCode":"","additionalInfo":""}, exception=null]] to /10.20.30.17:7470, cause: null
at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:108) ~[jrescloud-dubbo-core-1.0.12.jar!/:1.0.12]
at com.alibaba.dubbo.remoting.transport.AbstractPeer.send(AbstractPeer.java:51) ~[jrescloud-dubbo-core-1.0.12.jar!/:1.0.12]
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchangeHandler.received(HeaderExchangeHandler.java:171) ~[jrescloud-dubbo-core-1.0.12.jar!/:1.0.12]
at com.alibaba.dubbo.remoting.transport.DecodeHandler.received(DecodeHandler.java:52) ~[jrescloud-dubbo-core-1.0.12.jar!/:1.0.12]
at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:82) [jrescloud-dubbo-core-1.0.12.jar!/:1.0.12]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.nio.channels.ClosedChannelException
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.cleanUpWriteBuffer(AbstractNioWorker.java:434) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromUserCode(AbstractNioWorker.java:129) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleAcceptedSocket(NioServerSocketPipelineSink.java:99) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:36) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.channel.Channels.write(Channels.java:725) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(OneToOneEncoder.java:71) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:59) ~[netty-3.7.0.Final.jar!/:?]
at com.alibaba.dubbo.remoting.transport.netty.NettyHandler.writeRequested(NettyHandler.java:99) ~[jrescloud-dubbo-core-1.0.12.jar!/:1.0.12]
at org.jboss.netty.channel.Channels.write(Channels.java:704) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.channel.Channels.write(Channels.java:671) ~[netty-3.7.0.Final.jar!/:?]
at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) ~[netty-3.7.0.Final.jar!/:?]
at com.alibaba.dubbo.remoting.transport.netty.NettyChannel.send(NettyChannel.java:98) ~[jrescloud-dubbo-core-1.0.12.jar!/:1.0.12]
... 7 more
服务器或服务端进程负载太高都有可能发生上述异常。
ClosedChannelException 一般是由 Netty 主动抛出的,有可能是服务器端主动关闭,也可能是客户端关闭,都会导致写失败。参考:Netty 中 IOException: Connection reset by peer 与 java.nio.channels.ClosedChannelException: null。
进一步分析客户端异常,差不多在此前一刻,dubbo消费端有断开服务器的警告,如下:
[] 2019-11-23 16:08:57 [182976410] [c.a.d.r.z.ZookeeperRegistry]-[INFO] Curator-Framework-0-EventThread [DUBBO] Notify urls for subscribe url consumer://10.20.30.17/com.xxx.me.dubbo.inf.DubboProxyService?application=mebase-service&category=providers,configurators,routers&default.check=false&default.lazy=false&default.loadbalance=roundrobin&default.retries=0&default.timeout=30000&group=me5&interface=com.xxx.me.dubbo.inf.DubboProxyService&jrescloud=hs1.0&methods=invoke&pid=32359&revision=SNAPSHOT&scope=remote&side=consumer&timeout=7200000×memp=1574313912764&version=1.0.0.0, urls: [dubbo://10.20.30.17:8803/com.xxx.me.dubbo.inf.DubboProxyService?accepts=1000&alive=60000&anyhost=true&apis=&appalias=xxx me me5 service&application=me5-service&appport=8703&charset=utf-8&corethreads=100&generic=false&group=me5&interface=com.xxx.me.dubbo.inf.DubboProxyService&jrescloud=hs1.0&methods=invoke&pid=68933®istry.after.spring=false&revision=20191118.062113-155&side=provider&threads=500×memp=1574493535566&version=1.0.0.0, dubbo://10.20.30.17:8802/com.xxx.me.dubbo.inf.DubboProxyService?accepts=1000&alive=60000&anyhost=true&apis=&appalias=xxx me me5 service&application=me5-service&appport=8702&charset=utf-8&corethreads=100&generic=false&group=me5&interface=com.xxx.me.dubbo.inf.DubboProxyService&jrescloud=hs1.0&methods=invoke&pid=68946®istry.after.spring=false&revision=20191118.062113-155&side=provider&threads=500×memp=1574493531817&version=1.0.0.0], dubbo version: hs1.0, current host: 10.20.30.17
[] 2019-11-23 16:08:57 [182976411] [c.a.d.r.t.n.NettyChannel]-[INFO] Curator-Framework-0-EventThread [DUBBO] Close netty channel [id: 0x60446a7b, /10.20.30.17:11579 => /10.20.30.17:8801], dubbo version: hs1.0, current host: 10.20.30.17
[] 2019-11-23 16:08:57 [182976414] [c.a.d.r.p.d.DubboProtocol]-[INFO] DubboSharedHandler-thread-5 [DUBBO] disconected from /10.20.30.17:8801,url:dubbo://10.20.30.17:8801/com.xxx.me.dubbo.inf.DubboProxyService?accepts=1000&anyhost=true&apis=&appalias=xxx me me5 service&application=mebase-service&appport=8701&charset=utf-8&check=false&codec=dubbo&default.check=false&default.lazy=false&default.loadbalance=roundrobin&default.retries=0&default.timeout=30000&generic=false&group=me5&heartbeat=15000&interface=com.xxx.me.dubbo.inf.DubboProxyService&jrescloud=hs1.0&methods=invoke&pid=32359®istry.after.spring=false&revision=SNAPSHOT&scope=remote&side=consumer&timeout=7200000×memp=1574313912764&version=1.0.0.0, dubbo version: hs1.0, current host: 10.20.30.17
当客户端超过heartbeatTimeout没有收到服务端的应答心跳时,就会认为服务器挂了,主动断开连接。所以对这些巨型请求,要么使用MQ作为通信机制、要么轮训数据库、要么将超时时间设置的足够长,从而使得连接不被误关闭(从稳定的角度来说,用mq解耦是更加合理的);同时使用zk临时节点作为连接的跟踪机制(这一步是极为关键的,只有它能够是被服务方真的挂了,而不是临时僵死)。
这样就可能会导致服务已经执行完成,但是客户端永远都收不到了,即使以后恢复了连接仍然如此。
dubbo接收请求并发送已接收请求相关源码,可参见:https://www.cnblogs.com/java-zhao/p/7821908.html
dubbo netty-server源码参见:https://www.jianshu.com/p/cebc90b39eb7
ChannelEventRunnable handle RECEIVED operation error, channel is NettyChannel解决方法的更多相关文章
- vss error reading from file 解决方法
vss error reading from file 解决方法 1 若服务器中存在 vss/data/backup目录,请将该目录删掉2 运行cmd cd.. cd C:\Program Files ...
- 安装CAD出现Error 1904.Module的解决方法
在安装AutoCAD2008时,安装过程中出现了一个小错误,虽然说不影响使用,也不影响功能,但还是需要把这个问题解决,今天就和大家分享解决这个问题的方法. 错误描述 会在安装过程中出现错误提示:Err ...
- 关于163发邮件报错535 Error:authentication failed解决方法
关于发邮件报错535 Error:authentication failed解决方法 调用163邮箱服务器来发送邮件,我们需要开启POP3/SMTP服务,这时163邮件会让我们设置客户端授权码,这个授 ...
- mysql主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法
mysql教程主从同步失败Last_IO_Error: Got fatal error 1236 from master解决方法 遇到这样的错误如:“Last_IO_Error: Got fatal ...
- MySQL数据库”mysql SQL Error:1146,SQLState:42S02 “解决方法
项目在开发的时候在Mac平台下开发的,开发完了之后在LINUX环境上部署好之后,运行时MySQL数据库报错,提示为某个表不存在之类的错误信息,后来修改了MySQL的配置文件将大小写敏感去掉,问题解决. ...
- Myeclipse运行报错:an out of memory error has occurred的解决方法
不知道怎么了,重装的myeclipse2013,里边就放了一个项目,启动myeclipse就报 an out of memory error has occurred....... 一点yes就退出 ...
- vmware workstation unrecoverable error: (vmui)报错解决方法
实验室7月份刚换了电脑,之前一直用vmware来跑linux搞嵌入式开发,无论是宿舍的笔记本,还是之前用的旧台式机,都可以妥妥的跑vmware没有问题,结果换了新电脑之后,装上vmware works ...
- MySQL Workbench “Error Code: 1175” 的解决方法
转自:http://www.linuxidc.com/Linux/2012-04/59333.htm 当用MySQL Workbench进行数据库的批量更新时,执行一个语句会碰到以下错误提示: Err ...
- MySQL出错:ERROR 1045 (28000)的解决方法
MySQL突然不能用了,症状如下: [root@bogon ok]# mysql ERROR (): Access denied for user 'root'@'localhost' (using ...
随机推荐
- FFMPEG SDK 开发介绍(原创)
来源:http://blog.sina.com.cn/s/blog_62a8419a01016exv.html 本文是作者在使用ffmpeg sdk开发过程中的实际经验,现在与大家分享,欢迎学习交流. ...
- 【python】多任务(2. 进程)
进程间通信 Queue import multiprocessing def download_from_web(q): # 模拟从网上下载数据 data = [11, 22, 33, 44] for ...
- day 38
目录 元类 什么是元类 元类的作用 怎么自定义创建元类 元类 什么是元类 用class关键字定义的类本身是一个对象,负责产生该对象的类称之为元类(元类可以简称为类的类),内置的元类为type 元类的作 ...
- win2003下安装python3.4 + pyspider
昨天尝试了在win2003下安装python2.7.这个是文章地址:https://www.cnblogs.com/alpiny/p/11706606.html 但是程序跑了一晚上,发现有一点问题,是 ...
- Odoo销售模块
转载请注明原文地址:https://www.cnblogs.com/ygj0930/p/10825988.html 一:销售模块 销售模块的用途: 1)管理销售团队.销售人员:维护销售产品: 2)管理 ...
- 矩阵LU分解程序实现(Matlab)
n=4;%确定需要LU分解的矩阵维数 %A=zeros(n,n); L=eye(n,n);P=eye(n,n);U=zeros(n,n);%初始化矩阵 tempU=zeros(1,n);tempP=z ...
- python基础语法8 叠加装饰器,有参装饰器,wraps补充,迭代器
叠加装饰器: 叠加装饰器 - 每一个新的功能都应该写一个新的装饰器 - 否则会导致,代码冗余,结构不清晰,可扩展性差 在同一个被装饰对象中,添加多个装饰器,并执行. @装饰1 @装饰2 @装饰3 de ...
- 【IIS】跨域(转)
Access to XMLHttpRequest at 'http://*****/.dae' from origin 'http://192.168.198.21:22222' has been b ...
- libimobiledevice的安装与使用
说明:libimobiledevice相当于安卓的adb,可以使用命令对ios应用进行安装卸载等操作. 在MacOS下安装libimobiledevice: $ brew uninstall idev ...
- Monkey面试整理
1. 查找进程命令是什么? adb shell ps adb shell ps |findstr 名称 2. 如何获取包名 1)获取手机上的所有包名信息. adb shell pm list pack ...