NutzCN Logo
问答 zookeeper java.net.ConnectException: 拒绝连接 (Connection refused)
发布于 2360天前 作者 InkPointWash 12999 次浏览 复制 上一个帖子 下一个帖子
标签:

java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
[DEBUG] 17:36:59.931 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:203) - Ignoring exception during shutdown input
java.nio.channels.ClosedChannelException
at java.base/sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:780)
at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:401)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[DEBUG] 17:36:59.943 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:210) - Ignoring exception during shutdown output
java.nio.channels.ClosedChannelException
at java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:797)
at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:409)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[INFO ] 17:37:01.047 org.apache.zookeeper.ClientCnxn$SendThread.logStartConnect(ClientCnxn.java:1032) - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
[WARN ] 17:37:02.049 org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162) - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
[DEBUG] 17:37:02.049 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:203) - Ignoring exception during shutdown input
java.nio.channels.ClosedChannelException
at java.base/sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:780)
at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:401)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[DEBUG] 17:37:02.049 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:210) - Ignoring exception during shutdown output
java.nio.channels.ClosedChannelException
at java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:797)
at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:409)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[INFO ] 17:37:03.151 org.apache.zookeeper.ClientCnxn$SendThread.logStartConnect(ClientCnxn.java:1032) - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
[WARN ] 17:37:04.154 org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162) - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141)
[DEBUG] 17:37:04.154 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:203) - Ignoring exception during shutdown input
java.nio.channels.ClosedChannelException
at java.base/sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:780)
at java.base/sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:401)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:200)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[DEBUG] 17:37:04.154 org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:210) - Ignoring exception during shutdown output
java.nio.channels.ClosedChannelException
at java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:797)
at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:409)
at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:207)
at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1246)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1170)
[DEBUG] 17:37:04.265 org.apache.curator.RetryLoop.takeException(RetryLoop.java:171) - Retry-able exception received
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /dubbo/cn.wizzer.app.task.modules.services.TaskPlatformService/providers
at org.apache.zookeeper.KeeperException.create(KeeperException.java:99)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.exists(ZooKeeper.java:1102)
at org.apache.curator.framework.imps.ExistsBuilderImpl$3.call(ExistsBuilderImpl.java:268)
at org.apache.curator.framework.imps.ExistsBuilderImpl$3.call(ExistsBuilderImpl.java:257)
at org.apache.curator.connection.StandardConnectionHandlingPolicy.callWithRetry(StandardConnectionHandlingPolicy.java:64)
at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:100)
at org.apache.curator.framework.imps.ExistsBuilderImpl.pathInForegroundStandard(ExistsBuilderImpl.java:254)
at org.apache.curator.framework.imps.ExistsBuilderImpl.pathInForeground(ExistsBuilderImpl.java:247)
at org.apache.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:206)
at org.apache.curator.framework.imps.ExistsBuilderImpl.forPath(ExistsBuilderImpl.java:35)
at com.alibaba.dubbo.remoting.zookeeper.curator.CuratorZookeeperClient.checkExists(CuratorZookeeperClient.java:111)
at com.alibaba.dubbo.remoting.zookeeper.support.AbstractZookeeperClient.create(AbstractZookeeperClient.java:56)
at com.alibaba.dubbo.registry.zookeeper.ZookeeperRegistry.doRegister(ZookeeperRegistry.java:110)
at com.alibaba.dubbo.registry.support.FailbackRegistry.register(FailbackRegistry.java:130)
at com.alibaba.dubbo.registry.integration.RegistryProtocol.register(RegistryProtocol.java:124)
at com.alibaba.dubbo.registry.integration.RegistryProtocol.export(RegistryProtocol.java:143)
at com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export(ProtocolListenerWrapper.java:54)
at com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:91)
at com.alibaba.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:54)
at com.alibaba.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:505)
at com.alibaba.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:357)
at com.alibaba.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:316)
at com.alibaba.dubbo.config.ServiceConfig.export(ServiceConfig.java:215)
at org.nutz.integration.dubbo.ServiceBean._init(ServiceBean.java:163)
at org.nutz.integration.dubbo.ServiceBean$FM$_init$2163d58eff2424aa7c0e9c91fc4fe757.invoke(ServiceBean.java)
at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
at org.nutz.integration.dubbo.DubboManager.init(DubboManager.java:39)
at org.nutz.integration.dubbo.DubboManager._init(DubboManager.java:27)
at org.nutz.integration.dubbo.DubboManager$FM$_init$2163d58eff2424aa7c0e9c91fc4fe757.invoke(DubboManager.java)
at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:161)
at org.nutz.boot.starter.dubbo.DubboStarter.start(DubboStarter.java:17)
at org.nutz.boot.AppContext.startServers(AppContext.java:306)
at org.nutz.boot.NbApp.execute(NbApp.java:204)
at org.nutz.boot.NbApp.run(NbApp.java:177)
at cn.wizzer.app.task.commons.core.TaskMainLauncher.main(TaskMainLauncher.java:49)

```

7 回复

连不上zk,很明显吧?

启动ZooKeeper的时候会闪一个黑窗口出来,很快又不见了,是不是ZooKeeper启动失败啊?

没配zoo.conf吧,zk下载之后不配是跑不了的

# The number of milliseconds of each tick
tickTime=2000
# The number of ticks that the initial 
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between 
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
# do not use /tmp for storage, /tmp here is just 
# example sakes.
dataDir=/D:/zookeeper
# the port at which the clients will connect
clientPort=2181
# the maximum number of client connections.
# increase this if you need to handle more clients
#maxClientCnxns=60
#
# Be sure to read the maintenance section of the 
# administrator guide before turning on autopurge.
#
# http://zookeeper.apache.org/doc/current/zookeeperAdmin.html#sc_maintenance
#
# The number of snapshots to retain in dataDir
#autopurge.snapRetainCount=3
# Purge task interval in hours
# Set to "0" to disable auto purge feature
#autopurge.purgeInterval=1

配置了,文件名字也修改了

是不是 dataDir 配置 存在问题啊

添加回复
请先登陆
回到顶部