Tomcat启动dubbo-admin启动失败原因分析

Tomcat启动dubbo-admin启动失败原因分析


如图所示:
Tomcat启动dubbo-admin启动失败原因分析_第1张图片
原因分析:
查看tomcat日志

	Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.alibaba.dubbo.registry.RegistryService com.alibaba.dubbo.governance.sync.RegistryServerSync.registryService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService': FactoryBean threw exception on object creation; nested exception is org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000
		at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:517)
		at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
		at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:286)
		... 40 more
	Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryService': FactoryBean threw exception on object creation; nested exception is org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 5000
		at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
		at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102)
		at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1468)
		at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:249)
		at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
		at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:917)
		at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:860)
		at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:775)
		at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:489)
		... 42 more
	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:26)
		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:69)
		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.refer(RegistryProtocol.java:240)
		at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:60)
		at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:63)
		at com.alibaba.dubbo.rpc.Protocol$Adpative.refer(Protocol$Adpative.java)
		at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:392)
		at com.alibaba.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300)
		at com.alibaba.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:138)
		at com.alibaba.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:65)
		at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
		... 50 more

根据错误信息提示是Zookeper 没连接上 启动下Zookeper就好了
启动Zookeper之后重启下tomcat 访问dubbo-admin
Tomcat启动dubbo-admin启动失败原因分析_第2张图片

你可能感兴趣的:(技术随笔)