zookeeper.out日志:
2016-07-22 14:20:53,489 [myid:] - INFO [main:Environment@100] - Server environment:os.name=Linux 2016-07-22 14:20:53,489 [myid:] - INFO [main:Environment@100] - Server environment:os.arch=amd64 2016-07-22 14:20:53,489 [myid:] - INFO [main:Environment@100] - Server environment:os.version=3.10.0-327.10.1.el7.x86_64 2016-07-22 14:20:53,489 [myid:] - INFO [main:Environment@100] - Server environment:user.name=root 2016-07-22 14:20:53,489 [myid:] - INFO [main:Environment@100] - Server environment:user.home=/root 2016-07-22 14:20:53,489 [myid:] - INFO [main:Environment@100] - Server environment:user.dir=/ 2016-07-22 14:20:53,490 [myid:] - INFO [main:ZooKeeperServer@787] - tickTime set to 2000 2016-07-22 14:20:53,490 [myid:] - INFO [main:ZooKeeperServer@796] - minSessionTimeout set to -1 2016-07-22 14:20:53,490 [myid:] - INFO [main:ZooKeeperServer@805] - maxSessionTimeout set to -1 2016-07-22 14:20:53,497 [myid:] - INFO [main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:2181 2016-07-22 14:21:34,000 [myid:] - INFO [SessionTracker:ZooKeeperServer@355] - Expiring session 0x156113ab8010000, timeout of 40000ms exceeded 2016-07-22 14:21:34,001 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@489] - Processed session termination for sessionid: 0x156113ab8010000 2016-07-22 14:21:34,001 [myid:] - INFO [SyncThread:0:FileTxnLog@199] - Creating new log file: log.14 2016-07-22 14:21:45,285 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:9984 2016-07-22 14:21:45,333 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@900] - Client attempting to establish new session at /127.0.0.1:9984 2016-07-22 14:21:45,365 [myid:] - INFO [SyncThread:0:ZooKeeperServer@645] - Established session 0x1561143878b0000 with negotiated timeout 40000 for client /127.0.0.1:9984 2016-07-22 14:22:23,050 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception EndOfStreamException: Unable to read additional data from client sessionid 0x1561143878b0000, likely client has closed socket at org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:230) at org.apache.zookeeper.server.NIOServerCnxnFactory.run(NIOServerCnxnFactory.java:203) at java.lang.Thread.run(Thread.java:745) 2016-07-22 14:22:23,053 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1008] - Closed socket connection for client /127.0.0.1:9984 which had sessionid 0x1561143878b0000 2016-07-22 14:23:04,000 [myid:] - INFO [SessionTracker:ZooKeeperServer@355] - Expiring session 0x1561143878b0000, timeout of 40000ms exceeded 2016-07-22 14:23:04,001 [myid:] - INFO [ProcessThread(sid:0 cport:2181)::PrepRequestProcessor@489] - Processed session termination for sessionid: 0x1561143878b0000 2016-07-22 14:23:39,830 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /127.0.0.1:9997 2016-07-22 14:23:39,833 [myid:] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@900] - Client attempting to establish new session at /127.0.0.1:9997 2016-07-22 14:23:39,849 [myid:] - INFO [SyncThread:0:ZooKeeperServer@645] - Established session 0x1561143878b0001 with negotiated timeout 40000 for client /127.0.0.1:9997 2016-07-22 14:23:56,903 [myid:] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception
node.log日志: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_74] at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_74] at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) ~[zookeeper-3.4.5.jar:3.4.5-1392090] at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068) ~[zookeeper-3.4.5.jar:3.4.5-1392090] 2016-07-22 14:34:25.863 [main-SendThread(localhost:2081)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
Caused by: org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 60000 at com.alibaba.otter.shared.common.utils.zookeeper.ZkClientx.connect(ZkClientx.java:974) at com.alibaba.otter.shared.common.utils.zookeeper.ZkClientx.(ZkClientx.java:104) at com.alibaba.otter.shared.common.utils.zookeeper.ZkClientx.(ZkClientx.java:98) at com.alibaba.otter.shared.common.utils.zookeeper.ZkClientx.(ZkClientx.java:86) at com.alibaba.otter.shared.arbitrate.impl.zookeeper.ZooKeeperClient.createClient(ZooKeeperClient.java:86) at com.alibaba.otter.shared.arbitrate.impl.zookeeper.ZooKeeperClient.access$000(ZooKeeperClient.java:38) at com.alibaba.otter.shared.arbitrate.impl.zookeeper.ZooKeeperClient$1.apply(ZooKeeperClient.java:45) at com.alibaba.otter.shared.arbitrate.impl.zookeeper.ZooKeeperClient$1.apply(ZooKeeperClient.java:42) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:155) ... 56 more
原提问者GitHub用户 hjjoe1213123
Caused by: org.I0Itec.zkclient.exception.ZkTimeoutException: Unable to connect to zookeeper server within timeout: 60000, 感觉还是zookeeper的问题
原回答者GitHub用户agapple
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。