背景

今天clickhouse集群又双叒叕宕机了,重启一直报错如下错误。clickhouse服务没能成功启起来。

报错内容:

error:Coordination::Exception: All connection tries failed while connecting to Zookeeper. Addresses: x.x.x.x:2181,x.x.x.x:2181,x.x.x.x:2181
Poco::Exception. Code:1000, e.code() = 111, e.displayText() = Connection refused
Code: 33,e.displayText() = DB::Exception: Cannot read all data. Bytes read:0. Bytes expected:4.:while receiving handshake from zookeeper

分析过程

  1. 通过Error Code搜了一下,github上面显示CANNOT_READ_ALL_DATA,确实有点懵逼,没反应过来。
  2. 尝试在百度上搜,也没有什么有用的答案。
  3. 去github搜issues,终于找到了道友。具体见:github issues最后给出的回复:This is misbehaviour of ZooKeeper or a network error.
  4. 自己去看了一下我们的zookeeper集群【架构是三台节点,clickhouse与zookeeper的服务分别在A、B、C机器上】。现象是:A节点的clickhouse挂了,B、C节点的zookeeper挂了。所以把B、C节点的zookeeper重新启了,再启A节点的clickhouse。便没问题了。
  5. 其实,现在重新看日志,第一行已经写的很清楚了,zookeeper有问题。如果一开始注意到这个点,可能就不用花那么多时间去各种搜索了。【不过还是因为clickhouse的error日志太多,没能力快速捕捉到关键点0.0】
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐