生产环境运行过程中客户端与服务端Channel断了,无法自动恢复
问题:生产环境11台consumer[8台电信、3台联通]到8台provider(电信)全部中断,服务全部不可用! 生产环境运行过程中,dubbo-provider日志中出现: 16:49:26.109 [DubboServerHandler-10.111.1.214:20881-thread-743] INFO c.a.d.r.protocol.dubbo.DubboProtocol - [DUBBO] disconected from /xxx:27797,url:dubbo://xxx:20881/com.xxx.mms.api.service.IVideoApiService?anyhost=true...... 16:49:26.109 [DubboServerHandler-10.111.1.214:20881-thread-743] INFO c.a.d.r.protocol.dubbo.DubboProtocol - [DUBBO] disconected from /xxx:27797,url:dubbo://xxx:20881/com.xxx.mms.api.service.IVideoApiService?anyhost=true...... 我们使用dubbo协议,底层通过netty通信,上述日志是在DubboProtocol中disconnected方法被调用,其上层是调用了dubbo自己实现的NettyHandler的channelDisconnected方法,重写了SimpleChannelHandler的channelDisconnected,这个方法在什么情况下会被调用呢?是否因为网络因素导致,调用了这个方法后,没有发现有自动检测恢复机制?
此时,客户端无法请求到服务端,出现被禁用日志: Forbid consumer 10.111.1.214 access service com.xxx.mms.api.service.IVideoApiService from registry xxx:2181 use dubbo version 2.5.3, Please check registry access list (whitelist/blacklist)., MMS_API_ERR:com.alibaba.dubbo.rpc.RpcException: Forbid consumer 10.111.1.214 access service com.xxx.xxx from registry xxx.xxx.xxx.xxx:2181 use dubbo version 2.5.3, Please check registry access list (whitelist/blacklist).
可以参考这里的详解: http://www.jameswxx.com/%E4%B8%AD%E9%97%B4%E4%BB%B6/%E8%A7%A3%E5%86%B3dubbo%E9%97%AE%E9%A2%98%EF%BC%9Aforbid-consumer/
大家请帮忙分析下,多谢!
看起来是网络不稳定,provider都掉线了。
1、先排查网络是否正常。 2、检查注册中心是否工作正常 估计注册中心出故障的几率比较大。
能重现的话,应该排查起来会比较方便。不能重现的话,在出错地点做好埋点,记录相关信息,等待下次出现,期间建议排查一下注册中心。
当时出问题时检查注册中心telnet 2181端口是可以通的。如果是网络问题,如何来模拟重现呢? @nilmeme 如果想要重现的话,您建议在什么地方埋点呢,记录那些信息?Thanks a lot!
碰到了相似的问题,我这儿的问题是出现网络异常,然后网络恢复后,一部分服务可以发现,一部分没有发现。dubbo服务提供者重新注册时,是不是会出现注册不上的情况?或者说dubbo压根没有重新注册的机制,只是网络异常时,有一部分服务没有掉线?
这种问题虽然可以通过重新启动服务解决,但是很不好吧。
建议看下zk的输出文件,之前遇到过问题是zk重启后,monitor监控provider和consumer在线,但不能正常提供服务,从zookeeper.out中发现zk由于服务器zxid大于自己的,所以认定服务端session失效,导致一直重连,却不能成功,相关问题请参考链接: https://issues.apache.org/jira/browse/ZOOKEEPER-832
2017-06-22 16:43 GMT+08:00 tuser4198 [email protected]:
这种问题虽然可以通过重新启动服务解决,但是很不好吧。
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alibaba/dubbo/issues/458#issuecomment-310315988, or mute the thread https://github.com/notifications/unsubscribe-auth/ARlOwxRU--Mg8GumNQn09NE7WFKaMXF5ks5sGiktgaJpZM4N7FvU .
@TinaLan-525 我们测试环境也出现类似问题。zk打印了大量日志,zk和业务机器的秒连秒断。一直再刷 2017-08-18 16:03:40,521 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /172.18.81.126:37406 2017-08-18 16:03:40,522 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception EndOfStreamException: Unable to read additional data from client sessionid 0x0, likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:228) at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:203) at java.lang.Thread.run(Thread.java:745) 2017-08-18 16:03:40,522 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1008] - Closed socket connection for client /172.18.81.126:37406 (no session established for client) 目前发现的是部署dubbo服务的tomcat有一个线程一直在清除没用的连接 18-Aug-2017 00:00:34.501 INFO [Abandoned connection cleanup thread] org.apache.catalina.loader.WebappClassLoaderBase.findResourceInternal Illegal access: this web application instance has been stopped already. Could not load . The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. 但是业务服务确实正常的。 你们的问题最终定位到了吗?
Hi @david1228 ,麻烦问一下,这个问题最终解决了吗?有定论吗?