dubbo本机自测没有问题,远程连接不上

发布于 2021-11-26 19:51:37 字数 4592 浏览 422 评论 1

我在我的电脑上搭建了一个单机windows版的zk,然后写了一个provider,自己在本机写了一个consumer自测没有问题,可以调用service,但是其他人写的consumer,访问我的provider却出错,下面是错误信息

}, dubbo version: 2.5.3, current host: 192.168.56.1
2016-01-06 20:27:42,901 [main] INFO : com.alibaba.dubbo.config.AbstractConfig -  [DUBBO] Refer dubbo service com.mryx.oms.otm.service.BillService from url zookeeper://172.16.3.85:2181/com.alibaba.dubbo.registry.RegistryService?anyhost=true&application=oms-book-client&check=false&dubbo=2.5.3&interface=com.mryx.oms.otm.service.BillService&methods=getBillInfoByOtmId,saveBillInfo&pid=11820&revision=2.0&side=consumer&timestamp=1452083259260, dubbo version: 2.5.3, current host: 192.168.56.1
2016-01-06 20:27:42,929 [main] DEBUG: org.springframework.beans.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2016-01-06 20:27:42,931 [main] DEBUG: org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor - Autowiring by type from bean name 'com.mryx.oms.book.test.DubboTest' to bean named 'billService'
2016-01-06 20:27:42,931 [main] DEBUG: org.springframework.beans.factory.support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'org.springframework.transaction.config.internalTransactionAdvisor'
2016-01-06 20:27:42,941 [main] DEBUG: org.springframework.test.context.TestContextManager - beforeTestMethod(): instance [com.mryx.oms.book.test.DubboTest@367ac7c5], method [public void com.mryx.oms.book.test.DubboTest.test()]
2016-01-06 20:27:42,942 [main] DEBUG: org.springframework.test.context.CacheAwareContextLoaderDelegate - Retrieved ApplicationContext from cache with key [[MergedContextConfiguration@348f4ec testClass = DubboTest, locations = '{classpath:spring.xml, classpath:spring-mvc.xml}', classes = '{}', contextInitializerClasses = '[]', activeProfiles = '{}', contextLoader = 'org.springframework.test.context.support.DelegatingSmartContextLoader', parent = [null]]].
2016-01-06 20:27:44,397 [DubboClientReconnectTimer-thread-1] WARN : com.alibaba.dubbo.remoting.transport.AbstractClient -  [DUBBO] client reconnect to 192.168.137.1:20885 find error . url: dubbo://192.168.137.1:20885/com.mryx.oms.otm.service.BillService?anyhost=true&application=oms-book-client&check=false&codec=dubbo&dubbo=2.5.3&heartbeat=60000&interface=com.mryx.oms.otm.service.BillService&methods=getBillInfoByOtmId,saveBillInfo&pid=11820&revision=2.0&side=consumer&timestamp=1452083259260, dubbo version: 2.5.3, current host: 192.168.56.1
com.alibaba.dubbo.remoting.RemotingException: client(url: dubbo://192.168.137.1:20885/com.mryx.oms.otm.service.BillService?anyhost=true&application=oms-book-client&check=false&codec=dubbo&dubbo=2.5.3&heartbeat=60000&interface=com.mryx.oms.otm.service.BillService&methods=getBillInfoByOtmId,saveBillInfo&pid=11820&revision=2.0&side=consumer&timestamp=1452083259260) failed to connect to server /192.168.137.1:20885, error message is:connection timed out
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$1.run(AbstractClient.java:145)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.ConnectException: connection timed out
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.processConnectTimeout(NioClientSocketPipelineSink.java:371)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.run(NioClientSocketPipelineSink.java:283)
... 3 more
2016-01-06 20:27:50,615 [main-SendThread(172.16.3.85:2181)] DEBUG: org.apache.zookeeper.ClientCnxn - Got ping response for sessionid: 0x15216d0f2750005 after 4ms


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

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

发布评论

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

评论(1

恋你朝朝暮暮 2021-11-29 16:09:52

使用公司测试服务器搭建的zk集群是没有问题的,但是因为公司是使用的云服务器,好多端口都不开放,使用起来太不方便,所以还是希望在本地调试

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