各位大神,求解决dubbo映射zookeeper IP问题

发布于 2021-12-03 14:19:13 字数 10410 浏览 781 评论 5

WARN utils.NetUtils -  [DUBBO] Failed to retriving ip address, zdkr-server: zdkr-server, dubbo version: 2.4.1, current host: 127.0.0.1

java.net.UnknownHostException: zdkr-server: zdkr-server

        at java.net.InetAddress.getLocalHost(InetAddress.java:1402)

        at com.alibaba.dubbo.common.utils.NetUtils.getLocalAddress0(NetUtils.java:203)

        at com.alibaba.dubbo.common.utils.NetUtils.getLocalAddress(NetUtils.java:190)

        at com.alibaba.dubbo.common.utils.NetUtils.getLocalHost(NetUtils.java:154)

        at com.alibaba.dubbo.governance.sync.RegistryServerSync.<clinit>(RegistryServerSync.java:46)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)

        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

        at java.security.AccessController.doPrivileged(Native Method)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:671)

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:610)

        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:412)

        at org.springframework.beans.factory.annotation.InjectionMetadata.injectFields(InjectionMetadata.java:105)

        at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.java:240)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:959)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

        at java.security.AccessController.doPrivileged(Native Method)

        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)

        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)

        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)

        at com.alibaba.citrus.webx.context.WebxComponentsLoader.initWebApplicationContext(WebxComponentsLoader.java:117)

        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)

        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)

        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)

        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)

        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)

        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)

        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)

        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)

        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)

        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)

        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

        at org.apache.catalina.core.StandardService.start(StandardService.java:516)

        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

 WARN utils.ConfigUtils -  [DUBBO] No dubbo.properties found on the class path., dubbo version: 2.4.1, current host: 192.168.41.1

 INFO zkclient.ZkEventThread - Starting ZkClient event thread.

 INFO zkclient.ZkClient - zookeeper state changed (SyncConnected)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

清晨说ぺ晚安 2021-12-04 15:36:22

引用来自“lizhi.zero”的评论

zdkr-server: zdkr-server 这里配错了吧,前面是ip后面是别名

辞别 2021-12-04 15:29:50

java.net.UnknownHostException: zdkr-server: zdkr-server

本宫微胖 2021-12-04 14:42:22
No dubbo.properties found on the class path.,

 这个报错你没看到?

秉烛思 2021-12-04 10:21:38

@lizhi.zero 我只在dubbo.properties 里面配置了zookeeper的ip及端口,这个zdkr-server我就没配置过
5

女中豪杰 2021-12-04 08:45:00

zdkr-server: zdkr-server 这里配错了吧,前面是ip后面是别名

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文