项目中需要用到dubbo,没接触过,照着实例写了个demo,启动消费者报错

发布于 2021-11-27 01:23:12 字数 8766 浏览 875 评论 4

这里是控制台打印的错误信息:

SEVERE:  [DUBBO] Failed to start NettyClient Lenovo-june/192.168.1.49 connect to the server /192.168.1.49:20880 (check == false, ignore and retry later!), cause: client(url: dubbo://192.168.1.49:20880/com.alibaba.dubbo.demo.DemoService?anyhost=true&application=consumer-of-helloworld-app&check=false&codec=dubbo&dubbo=2.5.3&heartbeat=60000&interface=com.alibaba.dubbo.demo.DemoService&methods=sayhello&pid=5040&side=consumer&timestamp=1462429983757) failed to connect to server /192.168.1.49:20880, error message is:Connection refused: no further information, dubbo version: 2.5.3, current host: 192.168.1.49

com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://192.168.1.49:20880/com.alibaba.dubbo.demo.DemoService?anyhost=true&application=consumer-of-helloworld-app&check=false&codec=dubbo&dubbo=2.5.3&heartbeat=60000&interface=com.alibaba.dubbo.demo.DemoService&methods=sayhello&pid=5040&side=consumer&timestamp=1462429983757) failed to connect to server /192.168.1.49:20880, error message is:Connection refused: no further information
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.doConnect(NettyClient.java:124)
at com.alibaba.dubbo.remoting.transport.AbstractClient.connect(AbstractClient.java:280)
at com.alibaba.dubbo.remoting.transport.AbstractClient.<init>(AbstractClient.java:103)
at com.alibaba.dubbo.remoting.transport.netty.NettyClient.<init>(NettyClient.java:61)
at com.alibaba.dubbo.remoting.transport.netty.NettyTransporter.connect(NettyTransporter.java:37)
at com.alibaba.dubbo.remoting.Transporter$Adpative.connect(Transporter$Adpative.java)
at com.alibaba.dubbo.remoting.Transporters.connect(Transporters.java:67)
at com.alibaba.dubbo.remoting.exchange.support.header.HeaderExchanger.connect(HeaderExchanger.java:37)
at com.alibaba.dubbo.remoting.exchange.Exchangers.connect(Exchangers.java:102)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.initClient(DubboProtocol.java:378)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getSharedClient(DubboProtocol.java:344)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.getClients(DubboProtocol.java:321)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol.refer(DubboProtocol.java:303)
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:65)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:62)
at com.alibaba.dubbo.rpc.Protocol$Adpative.refer(Protocol$Adpative.java)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.toInvokers(RegistryDirectory.java:395)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.refreshInvoker(RegistryDirectory.java:224)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.notify(RegistryDirectory.java:195)
at com.alibaba.dubbo.registry.support.AbstractRegistry.notify(AbstractRegistry.java:449)
at com.alibaba.dubbo.registry.support.FailbackRegistry.doNotify(FailbackRegistry.java:273)
at com.alibaba.dubbo.registry.support.FailbackRegistry.notify(FailbackRegistry.java:259)
at com.alibaba.dubbo.registry.multicast.MulticastRegistry.subscribed(MulticastRegistry.java:351)
at com.alibaba.dubbo.registry.multicast.MulticastRegistry.subscribe(MulticastRegistry.java:376)
at com.alibaba.dubbo.registry.integration.RegistryDirectory.subscribe(RegistryDirectory.java:133)
at com.alibaba.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:271)
at com.alibaba.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:254)
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:63)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:60)
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)
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.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at Consumer.main(Consumer.java:11)
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.connect(NioClientSocketPipelineSink.java:384)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processSelectedKeys(NioClientSocketPipelineSink.java:354)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:276)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)


Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.alibaba.dubbo.demo.DemoService. No provider available for the service com.alibaba.dubbo.demo.DemoService from the url multicast://224.5.6.7:1234/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-helloworld-app&check=false&dubbo=2.5.3&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=5040&side=consumer&timestamp=1462429983757 to the consumer 192.168.1.49 use dubbo version 2.5.3
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.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)
at Consumer.main(Consumer.java:11)
Caused by: java.lang.IllegalStateException: Failed to check the status of the service com.alibaba.dubbo.demo.DemoService. No provider available for the service com.alibaba.dubbo.demo.DemoService from the url multicast://224.5.6.7:1234/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=consumer-of-helloworld-app&check=false&dubbo=2.5.3&interface=com.alibaba.dubbo.demo.DemoService&methods=sayHello&pid=5040&side=consumer&timestamp=1462429983757 to the consumer 192.168.1.49 use dubbo version 2.5.3
at com.alibaba.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:420)
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)
... 6 more
五月 05, 2016 2:33:06 下午 com.alibaba.dubbo.config.AbstractConfig info

INFO:  [DUBBO] Run shutdown hook now., dubbo version: 2.5.3, current host: 192.168.1.49

看不懂什么意思,大家帮帮忙

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

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

发布评论

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

评论(4

千笙结 2021-12-01 02:34:00

failed to connect to server /192.168.1.49:20880, error message is:Connection refused: no further information

柳絮泡泡 2021-12-01 02:17:04

这是我本机的ip,可以通

绝影如岚 2021-11-30 20:05:11

回复
看20880这个端口有没有被用到

能否归途做我良人 2021-11-28 19:03:37

failed to connect to server /192.168.1.49:20880, error message is:Connection refused: no further

看一下 192.168.1.49:20880 这个端口能不能连通

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