dubbo本机自测没有问题,远程连接不上
我在我的电脑上搭建了一个单机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×tamp=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×tamp=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×tamp=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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用公司测试服务器搭建的zk集群是没有问题的,但是因为公司是使用的云服务器,好多端口都不开放,使用起来太不方便,所以还是希望在本地调试