【springboot 整合 dubbo 报错 _springboot 】 | IT修真院·坑乎
咨询电话 : 010-59478634
切换导航
首页
我的提问
我的回答
我的点赞
消息通知
个人主页
×
提示
尚未登陆,前往官网登陆?
×
提示
尚未登陆,前往官网登陆?
springboot 整合 dubbo 报错
我也踩过这个坑(
1
)
已统计您的踩坑,无需重复点击
回答(1)
springboot
详细描述
springboot 整合 dubbo 使用 zookeeper 作为注册中心,在启动 服务端 后 程序 报错
源码
@Service( version = "${demo.service.version}", application = "${dubbo.application.id}", protocol = "${dubbo.protocol.id}", registry = "${dubbo.registry.id}" ) public class DubboProvider implements IDubboProvider { @Override public Response sayHello() { return new Response("connect success!!"); } } ================================================= ## ProtocolConfig Bean dubbo.protocol.id = zookeeper dubbo.protocol.name = dubbo dubbo.protocol.port = 20081 dubbo.protocol.status = server ## RegistryConfig Bean dubbo.registry.id = my-registry dubbo.registry.address = 127.0.0.1:2181 dubbo.registry.protocol = zookeeper dubbo.registry.timeout = 30000 dubbo.protocol.threads = 10
java.net.ConnectException: Connection refused: no further information at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_101] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_101] at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361) ~[zookeeper-3.4.9.jar:3.4.9-1757313] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) ~[zookeeper-3.4.9.jar:3.4.9-1757313] 2018-09-07 16:47:28.915 INFO 6348 --- [127.0.0.1:2181)] org.apache.zookeeper.ClientCnxn : Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 2018-09-07 16:47:29.409 ERROR 6348 --- [bboShutdownHook] org.apache.curator.ConnectionState : Connection timed out for connection string (127.0.0.1:2181) and timeout (5000) / elapsed (55472) org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:225) [curator-client-2.12.0.jar:na] at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:94) [curator-client-2.12.0.jar:na] at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:117) [curator-client-2.12.0.jar:na] at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:489) [curator-framework-2.12.0.jar:na] at org.apache.curator.framework.imps.DeleteBuilderImpl$5.call(DeleteBuilderImpl.java:250) [curator-framework-2.12.0.jar:na] at org.apache.curator.framework.imps.DeleteBuilderImpl$5.call(DeleteBuilderImpl.java:244) [curator-framework-2.12.0.jar:na] at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:109) [curator-client-2.12.0.jar:na] at org.apache.curator.framework.imps.DeleteBuilderImpl.pathInForeground(DeleteBuilderImpl.java:241) [curator-framework-2.12.0.jar:na] at org.apache.curator.framework.imps.DeleteBuilderImpl.forPath(DeleteBuilderImpl.java:225) [curator-framework-2.12.0.jar:na] at org.apache.curator.framework.imps.DeleteBuilderImpl.forPath(DeleteBuilderImpl.java:35) [curator-framework-2.12.0.jar:na] at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.delete(CuratorZookeeperClient.java:96) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.doUnregister(ZookeeperRegistry.java:123) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.registry.support.FailbackRegistry.unregister(FailbackRegistry.java:161) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:458) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.registry.support.FailbackRegistry.destroy(FailbackRegistry.java:437) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.destroy(ZookeeperRegistry.java:103) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.registry.support.AbstractRegistryFactory.destroyAll(AbstractRegistryFactory.java:71) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.ProtocolConfig.destroyAll(ProtocolConfig.java:158) [dubbo-2.6.2.jar:2.6.2] at com.alibaba.dubbo.config.AbstractConfig$1.run(AbstractConfig.java:83) [dubbo-2.6.2.jar:2.6.2] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
编辑于2024-11-24
时间排序
热门排序
[武汉|结业弟子]JAVA-李伟明
0
检查是本地 zookeeper 未开启,导致 连接超时,无法连接到注册中心
查看全部>
编辑于2018-11-02
首页
1
末页
去第
页
确定
Copyright ©2015 北京葡萄藤信息技术有限公司 All Rights Reserved | 京ICP备15035574号-1
复制链接
新浪微博
微信扫一扫
2641
0
10
springboot 整合 dubbo 报错
1
1