apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.5k stars 26.43k forks source link

error occurs when my service-application start #2654

Closed iamzken closed 6 years ago

iamzken commented 6 years ago

18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.io.tmpdir=C:\Users\HouBank\AppData\Local\Temp\ 18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:java.compiler= 18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.name=Windows 10 18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.arch=amd64 18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:os.version=10.0 18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.name=HouBank 18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.home=C:\Users\HouBank 18:03:20.912 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Client environment:user.dir=E:\git-idea\xxl-job 18:03:20.914 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=60000 watcher=org.I0Itec.zkclient.ZkClient@2e7517aa 18:03:20.928 risk_service [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 18:03:20.931 risk_service [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established to 127.0.0.1/127.0.0.1:2181, initiating session 18:03:25,926 INFO [ZkClient-EventThread-83-127.0.0.1:2181] [ZkEventThread] - [|||] Terminate ZkClient event thread. 18:03:48.369 risk_service [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server 127.0.0.1/127.0.0.1:2181, sessionid = 0x1667fb155010004, negotiated timeout = 40000 18:03:48.428 risk_service [main] INFO org.apache.zookeeper.ZooKeeper - Session: 0x1667fb155010004 closed 18:03:48.431 risk_service [main-EventThread] INFO org.apache.zookeeper.ClientCnxn - EventThread shut down 18:03:48.433 risk_service [main] WARN o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applyService' defined in file [E:\hb_risk_zhangkenan_20171205\hb_risk_service\target\classes\com\houbank\service\rpc\ApplyService.class]: Initialization of bean failed; nested exception is org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000 18:03:48.440 risk_service [main] INFO o.a.catalina.core.StandardService - Stopping service Tomcat 18:03:48.485 risk_service [main] WARN o.s.boot.SpringApplication - Error handling failed (Error creating bean with name 'sqlSessionFactoryBean' defined in class path resource [com/houbank/core/config/ds/MybatisConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor' defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]: Factory method 'transactionAdvisor' threw exception; nested exception is java.lang.NullPointerException) 18:03:48.496 risk_service [main] ERROR o.s.boot.SpringApplication - Application startup failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'applyService' defined in file [E:\hb_risk_zhangkenan_20171205\hb_risk_service\target\classes\com\houbank\service\rpc\ApplyService.class]: Initialization of bean failed; nested exception is org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:372) at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1187) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1176) at com.houbank.service.ApplicationService.main(ApplicationService.java:36) Caused by: org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000 at org.I0Itec.zkclient.ZkClient.connect(ZkClient.java:876) at org.I0Itec.zkclient.ZkClient.(ZkClient.java:98) at org.I0Itec.zkclient.ZkClient.(ZkClient.java:92) at org.I0Itec.zkclient.ZkClient.(ZkClient.java:80) at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient.(ZkclientZookeeperClient.java:29) at com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperTransporter.connect(ZkclientZookeeperTransporter.java:10) at com.alibaba.dubbo.remoting.zookeeper.ZookeeperTransporter$Adpative.connect(ZookeeperTransporter$Adpative.java) at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.(ZookeeperRegistry.java:71) at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistryFactory.createRegistry(ZookeeperRegistryFactory.java:37) at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.getRegistry(AbstractRegistryFactory.java:94) at com.alibaba.dubbo.registry.RegistryFactory$Adpative.getRegistry(RegistryFactory$Adpative.java) at com.alibaba.dubbo.registry.integration.RegistryProtocol.getRegistry(RegistryProtocol.java:190) at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:109) at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54) at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:53) at com.alibaba.dubbo.rpc.Protocol$Adpative.export(Protocol$Adpative.java) at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:494) at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:285) at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:246) at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:145) at com.houbank.core.config.rpc.RPCInitializer.exportService(RPCInitializer.java:232) at com.houbank.core.config.rpc.RemoteServiceConfig.postProcessAfterInitialization(RemoteServiceConfig.java:35) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:423) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1633) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ... 15 common frames omitted

lexburner commented 6 years ago

check the status of your zookeeper.

lllichen commented 6 years ago

Unable to connect to zookeeper server within timeout: 5000

iamzken commented 6 years ago

Zookeeper is normal, and this is good at first, and it's likely to happen over time, and once this error occurs, it won't be able to connect anymore.

cvictory commented 6 years ago
  1. Firstly you can upload a demo.
  2. Then you should tell us how it heppen so that we can reproduce this issue.

iamzken notifications@github.com 于2018年10月19日周五 下午6:10写道:

Zookeeper is normal, and this is good at first, and it's likely to happen over time, and once this error occurs, it won't be able to connect anymore.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apache/incubator-dubbo/issues/2654#issuecomment-431314143, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5mbK858k8yx0afDLAViDf08pJ1uFscks5umaT6gaJpZM4XjkvE .

--

Best Regard! cvitory

zonghaishang commented 6 years ago

Unable to connect to zookeeper server within timeout: 5000, check zookeeper .