dubbo服务生产环境重大问题:求各位大神帮忙解决下
问题描述:
部署在测试环境上的dubbo服务,有时候会自动down掉,别人调用不了,但是我们人为没有动过它。这种出现概率平均1-2天发生1次,不知道什么原因引起的。目前还解决不了。如果到线上还这样,会影响公司的交易量的,很危险。
看了下日志报错是这样的:
1:客户端调用方的日志:
com.alibaba.dubbo.rpc.RpcException: Forbid consumer 192.168.18.86 access service com.niiwoo.rce.service.RCEComputeService from registry 192.168.18.86:2181 use dubbo version 2.8.4, Please check registry access list (whitelist/blacklist).
at com.alibaba.dubbo.registry.integration.RegistryDirectory.doList(RegistryDirectory.java:579)
at com.alibaba.dubbo.rpc.cluster.directory.AbstractDirectory.list(AbstractDirectory.java:73)
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.list(AbstractClusterInvoker.java:260)
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:219)
at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:72)
at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
at com.alibaba.dubbo.common.bytecode.proxy0.updateVariable(proxy0.java)
at com.tianchengsys.rdp.dubbo.consumer.service.imp.VariableServiceImpl.updateVariable(VariableServiceImpl.java:30)
at com.tianchengsys.rdp.service.impl.McsVariableServiceImpl.updateVariable(McsVariableServiceImpl.java:108)
at com.tianchengsys.rdp.service.impl.McsVariableServiceImpl$$FastClassBySpringCGLIB$$fbc6f996.invoke(
2:dubbo服务相关日志
2017-11-11 07:26:35,994 [main-SendThread(192.168.18.86:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:1096) - Client session timed out, have not heard from server in 40281ms for sessionid 0x45f95de2d891148, closing socket connection and attempting reconnect 2017-11-11 07:26:52,703 [main-SendThread(192.168.18.90:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:975) - Opening socket connection to server 192.168.18.90/192.168.18.90:2181. Will not attempt to authenticate using SASL (unknown error) 2017-11-11 07:27:03,752 [main-SendThread(192.168.18.90:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:852) - Socket connection established to 192.168.18.90/192.168.18.90:2181, initiating session 2017-11-11 07:29:21,928 [main-SendThread(192.168.18.90:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:1096) - Client session timed out, have not heard from server in 149223ms for sessionid 0x45f95de2d891148, closing socket connection and attempting reconnect 2017-11-11 07:29:55,024 [main-SendThread(192.168.18.89:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:975) - Opening socket connection to server 192.168.18.89/192.168.18.89:2181. Will not attempt to authenticate using SASL (unknown error) 2017-11-11 07:29:55,025 [main-SendThread(192.168.18.89:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:852) - Socket connection established to 192.168.18.89/192.168.18.89:2181, initiating session 2017-11-11 07:29:55,448 [main-SendThread(192.168.18.89:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:1094) - Unable to reconnect to ZooKeeper service, session 0x45f95de2d891148 has expired, closing socket connection 2017-11-11 07:30:31,361 [main-SendThread(192.168.18.90:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:975) - Opening socket connection to server 192.168.18.90/192.168.18.90:2181. Will not attempt to authenticate using SASL (unknown error) 2017-11-11 07:30:31,362 [main-SendThread(192.168.18.90:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:852) - Socket connection established to 192.168.18.90/192.168.18.90:2181, initiating session 2017-11-11 07:30:31,777 [main-SendThread(192.168.18.90:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:1235) - Session establishment complete on server 192.168.18.90/192.168.18.90:2181, sessionid = 0x35e93bd6a5cbc61, negotiated timeout = 60000 2017-11-11 07:31:41,632 [main-SendThread(192.168.18.90:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:1096) - Client session timed out, have not heard from server in 41620ms for sessionid 0x35e93bd6a5cbc61, closing socket connection and attempting reconnect 2017-11-11 07:31:58,063 [main-SendThread(192.168.18.86:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:975) - Opening socket connection to server 192.168.18.86/192.168.18.86:2181. Will not attempt to authenticate using SASL (unknown error) 2017-11-11 07:32:05,662 [main-SendThread(192.168.18.86:2181)] INFO org.apache.zookeeper.ClientCnxn$SendThread (ClientCnxn.java:852) - Socket connection established to 192.168.18.86/192.168.18.86:2181, initiating session
这个和dubbo框架没什么关系吧。provider日志看上去zk连接有问题
是不是内网不稳定,看着都是zk不断重连的问题。
Unable to reconnect to ZooKeeper service, session 0x45f95de2d891148 has expired, closing socket connection 应该是网络不稳定,造成zk连接不上
有没有用到dubbo-webservice模块? 我也碰到过,是由于webservice模块CXF定时进行full gc,导致与zk连接中断产生的。具体情况参见如下链接: Zookeeper每隔10小时连接断开问题分析与解决
http://mp.weixin.qq.com/s?__biz=MzIwOTc1MzE4MQ==&mid=2247483678&idx=1&sn=a93b072d91c2b37cd556999a0142fde8&chksm=976e442ca019cd3a75cd4cb643189ca13789be02bff23b95e52e01b5dde2a1b904032db8f955#rd
这个问题还是重点从部署环境、业务逻辑的角度去排查,包括jvm的监控等。 另外请不要使用这样的issue标题,误以为dubbo缺陷,给别人造成困扰。