zookeeper启动:Could not find or load main class org.apache.zookeeper.server.quorum.

启动zookeeper3.5.6出现如下错误:Could not find or load main class org.apache.zookeeper.server.quorum.

应该是解压后的文件中不存在 src目录和一个jar包

,我换了一个版本 换成了3.4.14就可以了。 

下载地址:mirror.bit.edu.cn/apache/zookeeper/

## 如题所示,设置以及出现的问题如下,求大神解答,跪求!!!! zoo.cfg如下: tickTime=2000 initLimit=10 syncLimit=5 dataDir=/usr/local/hadoop/zookeeper/data dataLogDir=/usr/local/hadoop/zookeeper/log clientPort=2184 server.1=192.168.59.10:2888:3788 server.2=192.168.59.11:2888:3788 server.3=192.168.59.12:2888:3788 启动时: JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Starting zookeeper ... STARTED ![图片说明](https://img-ask.csdn.net/upload/201611/19/1479549351_651524.png) 查看状态: JMX enabled by default Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg Error contacting service. It is probably not running. ![图片说明](https://img-ask.csdn.net/upload/201611/19/1479549409_73529.png) zkookeeper.out 文件如下: 2016-11-19 16:54:33,948 [myid:] - INFO [main:QuorumPeerConfig@101] - Reading configuration from: /usr/local/zookeeper/bin/../conf/zoo.cfg 2016-11-19 16:54:33,956 [myid:] - INFO [main:QuorumPeerConfig@334] - Defaulting to majority quorums 2016-11-19 16:54:33,965 [myid:1] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3 2016-11-19 16:54:33,965 [myid:1] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0 2016-11-19 16:54:33,965 [myid:1] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled. 2016-11-19 16:54:33,984 [myid:1] - INFO [main:QuorumPeerMain@132] - Starting quorum peer 2016-11-19 16:54:33,998 [myid:1] - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2184 2016-11-19 16:54:34,038 [myid:1] - INFO [main:QuorumPeer@913] - tickTime set to 2000 2016-11-19 16:54:34,038 [myid:1] - INFO [main:QuorumPeer@933] - minSessionTimeout set to -1 2016-11-19 16:54:34,038 [myid:1] - INFO [main:QuorumPeer@944] - maxSessionTimeout set to -1 2016-11-19 16:54:34,038 [myid:1] - INFO [main:QuorumPeer@959] - initLimit set to 10 2016-11-19 16:54:34,071 [myid:1] - INFO [main:QuorumPeer@429] - currentEpoch not found! Creating with a reasonable default of 0. This should only happen when you are upgrading your installation 2016-11-19 16:54:34,075 [myid:1] - INFO [main:QuorumPeer@444] - acceptedEpoch not found! Creating with a reasonable default of 0. This should only happen when you are upgrading your installation 2016-11-19 16:54:34,088 [myid:1] - INFO [Thread-1:QuorumCnxManager$Listener@486] - My election bind port: 0.0.0.0/0.0.0.0:3788 2016-11-19 16:54:34,102 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2184:QuorumPeer@670] - LOOKING 2016-11-19 16:54:34,103 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2184:FastLeaderElection@740] - New election. My id = 1, proposed zxid=0x0 2016-11-19 16:54:34,108 [myid:1] - INFO [WorkerReceiver[myid=1]:FastLeaderElection@542] - Notification: 1 (n.leader), 0x0 (n.zxid), 0x1 (n.round), LOOKING (n.state), 1 (n.sid), 0x0 (n.peerEPoch), LOOKING (my state) 2016-11-19 16:54:34,113 [myid:1] - WARN [WorkerSender[myid=1]:QuorumCnxManager@368] - Cannot open channel to 2 at election address /192.168.59.11:3788 java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354) at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:327) at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:393) at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:365) at java.lang.Thread.run(Thread.java:745) 2016-11-19 16:54:34,117 [myid:1] - WARN [WorkerSender[myid=1]:QuorumCnxManager@368] - Cannot open channel to 3 at election address /192.168.59.12:3788 java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354) at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:327) at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:393) at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:365) at java.lang.Thread.run(Thread.java:745) 2016-11-19 16:54:34,313 [myid:1] - WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2184:QuorumCnxManager@368] - Cannot open channel to 2 at election address /192.168.59.11:3788 java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354) at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectAll(QuorumCnxManager.java:388) at org.apache.zookeeper.server.quorum.FastLeaderElection.lookForLeader(FastLeaderElection.java:765) at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:716)
©️2020 CSDN 皮肤主题: 技术工厂 设计师:CSDN官方博客 返回首页