zookeeper Exception when following the leader

小乞丐 发布于 2015/06/12 17:36
阅读 3K+
收藏 0

不知道有没有哪位大哥遇到过zookeeper 莫名其秒挂掉的现象..

zookeeper日志信息:

2015-06-12 13:03:54,998 [myid:2] - WARN  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:Follower@92] - Exception when following the leader
java.io.EOFException
at java.io.DataInputStream.readInt(DataInputStream.java:392)
at org.apache.jute.BinaryInputArchive.readInt(BinaryInputArchive.java:63)
at org.apache.zookeeper.server.quorum.QuorumPacket.deserialize(QuorumPacket.java:83)
at org.apache.jute.BinaryInputArchive.readRecord(BinaryInputArchive.java:103)
at org.apache.zookeeper.server.quorum.Learner.readPacket(Learner.java:160)
at org.apache.zookeeper.server.quorum.Follower.followLeader(Follower.java:88)
at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:991)
2015-06-12 13:03:55,000 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:MBeanRegistry@119] - Unregister MBean [org.apache.ZooKeeperService:name0=ReplicatedServer_id2,name1=replica.2,name2=Follower]
2015-06-12 13:03:55,001 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:Follower@197] - shutdown called
java.lang.Exception: shutdown Follower
at org.apache.zookeeper.server.quorum.Follower.shutdown(Follower.java:197)
at org.apache.zookeeper.server.quorum.QuorumPeer.run(QuorumPeer.java:995)
2015-06-12 13:03:55,001 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:LearnerZooKeeperServer@161] - Shutting down
2015-06-12 13:03:55,001 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer@443] - shutting down
2015-06-12 13:03:55,002 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FollowerRequestProcessor@135] - Shutting down
2015-06-12 13:03:55,003 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:CommitProcessor@357] - Shutting down
2015-06-12 13:03:55,003 [myid:2] - INFO  [FollowerRequestProcessor:2:FollowerRequestProcessor@106] - FollowerRequestProcessor exited loop!
2015-06-12 13:03:55,003 [myid:2] - INFO  [CommitProcessor:2:CommitProcessor@192] - CommitProcessor exited loop!
2015-06-12 13:03:55,004 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:FinalRequestProcessor@476] - shutdown of request processor complete
2015-06-12 13:03:55,005 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:MBeanRegistry@119] - Unregister MBean [org.apache.ZooKeeperService:name0=ReplicatedServer_id2,name1=replica.2,name2=Follower,name3=InMemoryDataTree]
2015-06-12 13:03:55,005 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:SyncRequestProcessor@191] - Shutting down
2015-06-12 13:03:57,841 [myid:2] - INFO  [NIOServerCxnFactory.AcceptThread:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory$AcceptThread@296] - Accepted socket connection from /172.16.20.2:62539
2015-06-12 13:03:57,843 [myid:2] - WARN  [NIOWorkerThread-1:NIOServerCnxn@372] - Exception causing close of session 0x0: ZooKeeperServer not running
2015-06-12 13:03:57,843 [myid:2] - INFO  [NIOWorkerThread-1:NIOServerCnxn@1006] - Closed socket connection for client /172.16.20.2:62539 (no session established for client)
2015-06-12 13:04:01,017 [myid:2] - INFO  [NIOServerCxnFactory.AcceptThread:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory$AcceptThread@296] - Accepted socket connection from /172.16.20.2:62542
2015-06-12 13:04:01,022 [myid:2] - WARN  [NIOWorkerThread-2:NIOServerCnxn@372] - Exception causing close of session 0x0: ZooKeeperServer not running
2015-06-12 13:04:01,023 [myid:2] - INFO  [NIOWorkerThread-2:NIOServerCnxn@1006] - Closed socket connection for client /172.16.20.2:62542 (no session established for client)
2015-06-12 13:04:01,121 [myid:2] - INFO  [NIOServerCxnFactory.AcceptThread:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory$AcceptThread@296] - Accepted socket connection from /172.16.20.3:27432
2015-06-12 13:04:01,122 [myid:2] - WARN  [NIOWorkerThread-3:NIOServerCnxn@372] - Exception causing close of session 0x0: ZooKeeperServer not running
2015-06-12 13:04:01,122 [myid:2] - INFO  [NIOWorkerThread-3:NIOServerCnxn@1006] - Closed socket connection for client /172.16.20.3:27432 (no session established for client)
2015-06-12 13:04:01,506 [myid:2] - INFO  [NIOServerCxnFactory.AcceptThread:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory$AcceptThread@296] - Accepted socket connection from /172.16.20.1:63948
2015-06-12 13:04:01,507 [myid:2] - WARN  [NIOWorkerThread-4:NIOServerCnxn@372] - Exception causing close of session 0x0: ZooKeeperServer not running
2015-06-12 13:04:01,507 [myid:2] - INFO  [NIOWorkerThread-4:NIOServerCnxn@1006] - Closed socket connection for client /172.16.20.1:63948 (no session established for client)
2015-06-12 13:04:04,137 [myid:2] - WARN  [SyncThread:2:FileTxnLog@335] - fsync-ing the write ahead log in SyncThread:2 took 13600ms which will adversely effect operation latency. See the ZooKeeper troubleshooting guide
2015-06-12 13:04:04,138 [myid:2] - WARN  [SyncThread:2:SendAckRequestProcessor@64] - Closing connection to leader, exception during packet send
java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.apache.zookeeper.server.quorum.Learner.writePacket(Learner.java:146)
at org.apache.zookeeper.server.quorum.SendAckRequestProcessor.flush(SendAckRequestProcessor.java:62)
at org.apache.zookeeper.server.SyncRequestProcessor.flush(SyncRequestProcessor.java:186)
at org.apache.zookeeper.server.SyncRequestProcessor.run(SyncRequestProcessor.java:113)
2015-06-12 13:04:04,139 [myid:2] - INFO  [SyncThread:2:SyncRequestProcessor@169] - SyncRequestProcessor exited!
2015-06-12 13:04:04,139 [myid:2] - WARN  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:QuorumPeer@1038] - PeerState set to LOOKING
2015-06-12 13:04:04,139 [myid:2] - INFO  [QuorumPeer[myid=2]/0:0:0:0:0:0:0:0:2181:QuorumPeer@913] - LOOKING

zookeeper的配置:

clientPort=2181
dataDir=/opt/zookeeper
syncLimit=2
tickTime=2000
initLimit=5
server.1=kafka1:2888:3888:participant
server.2=kafka2:2888:3888:participant
server.3=kafka3:2888:3888:participant


运行一段时间突然出现此错误。

加载中
0
JJYYTOP
JJYYTOP

题主,你这个问题解决了吗?


返回顶部
顶部