Clickhouse版本:20.3.6.40-2

clickhouse集群三个节点,一分片,三副本,三个节点数据完全一样

1. 问题描述

在使用连接工具操作时,发现其中一个节点连接拒绝,无法操作,另外两个节点正常,报错如下:

2. 问题定位

经查看日志,系统报错MySQLHandlerFactory:Failed to read RSA key pair from server

由于clickhouse服务配置了systmctl,所以一直在重启,启动5s后又会因为报错挂掉,一直反复重启,具体报错如下:

3. 解决过程

起初很疑惑,为什么会报mysql相关的错,因为服务没有任何依赖mysql的东西,也没有创建mysql引擎的相关表,多次查找资料也未果。

最终只能尝试将clickhouse下的data目录备份后,然后删除,再重新启动,结果服务启动后不报错了!

结论是clickhouse元数据有问题!

下面是详细步骤:

由于此集群是三节点互相复制的,所以即使一个节点无法恢复也可以切到其他节点

(1)以防万一,先将目录备份一个,然后删除报错节点clickhouse下data目录

(2)删除zk下对应报错节点的建表信息,因为zk上是会有元数据记录的,不删除的话建表会提示表已存在!

具体操作为rmr  /clickhouse/tables/分片名/表名/replicas/服务器名,具体多少张表,执行多少条就可以了

(3)重启clickhosue服务

(4)重新建表,建表之后数据就会自动从另外两个节点同步过来了

  表多的话可以使用脚本clickhouse-client  -u  username --password passwd  -d databasename --multiquery <  /home/data/createtable.sql

  建表语句都放在createtable.sql即可

--------------------------------END --------------------------------

希望对大家有帮助,有问题多交流

ClickHouse元数据异常-MySQLHandlerFactory:Failed to read RSA key pair from server的更多相关文章

  1. RSA key lengths

    RSA key lengths From http://www.javamex.com/tutorials/cryptography/rsa_key_length.shtml When you cre ...

  2. 【异常】The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

    1 详细异常信息 The last packet sent successfully to the server was milliseconds ago. The driver has not re ...

  3. jenkins:配置密钥时报错的解决:Failed to add SSH key. Message invalid privatekey(Jenkins 2.257)

    一,报错的现象: 1,提示信息: jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message ...

  4. 解决Window Azure: Failed to start Development Storage: the SQL Server instance ‘localhost\SQLExpress’ could not be found.

    运行Window Arzure 项目,报如下错误: Windows Azure Tools: Failed to initialize Windows Azure storage emulator. ...

  5. composer错误提示Cloning failed using an ssh key for authentication的解决方法

    早上ytkah在测试laravel用composer安装一些插件时出现了一些错误,提示如下,是github的ssh密匙认证错误,提示要重新生成token,然后保存在/root/.config/comp ...

  6. Vue.js Failed to resolve filter: key

    转自:https://stackoverflow.com/questions/35835214/vue-js-failed-to-resolve-filter-key I am following t ...

  7. 异常: java.security.InvalidKeyException: Illegal key size

    今天在做接口测试的时候遇到个异常: java.security.InvalidKeyException: Illegal key size. SecretKeySpec secretKeySpec = ...

  8. ssh访问跳过RSA key"yes/no"验证

    通常我们再批量配置多台机器的时候经常出现通过ssh批量登录机器提示 RSA key fingerprint is ::a6:b1:c9:d7:b8::c1:::8e:f5::2b:8b. Are yo ...

  9. OpenSSL和Python实现RSA Key公钥加密私钥解密

    基于非对称算法的RSA Key主要有两个用途,数字签名和验证(私钥签名,公钥验证),以及非对称加解密(公钥加密,私钥解密).本文提供一个基于OpenSSL和Python进行非对称加解密的例子. 1. ...

随机推荐

  1. JDK下载安装与卸载详解

    JDK下载安装 1. 下载: 推荐版本:JDK 8 (7.8目前广泛应用) 官网地址:https://www.oracle.com/cn/java/technologies/javase/javase ...

  2. window下安装docker教程

    Wi10系统下安装Docker 准备工作: 查看是否带有Hyper-V 1.第一步   2.第二步   第三步   第四步   第五步确认是否有Hyper-V(可以理解为windows自带虚拟机功能) ...

  3. SwiftUI error All In One

    SwiftUI error All In One Instance member xxx cannot be used on type yyy Instance member 'game' canno ...

  4. Apple WWDC All In One

    Apple WWDC All In One https://developer.apple.com/wwdc20/ https://developer.apple.com/videos/wwdc202 ...

  5. React.createClass vs. ES6 Class Components

    1 1 1 https://www.fullstackreact.com/articles/react-create-class-vs-es6-class-components/ React.crea ...

  6. 如何在 GitHUb 上使用 gitbook 发布一本在线书籍

    如何在 GitHUb 上使用 gitbook 发布一本在线书籍 ebook / pdf refs https://docs.gitbook.com/integrations/github xgqfrm ...

  7. 如何用 js 实现一个 apply 函数

    如何用 js 实现一个 apply 函数 原理 实现方式 总结 refs https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen ...

  8. 如何在 macOS 上进行滚动截屏

    如何在 macOS 上进行滚动截屏 Shift-Command-5 https://support.apple.com/zh-cn/guide/mac-help/mh26782/mac demo Xn ...

  9. NAIO & Node.js All In One

    NAIO & Node.js All In One Node.js Tutorials https://nodejs.org/en/docs/ https://nodejs.org/en/do ...

  10. 最实用JS 留着学习

    1.A标签删除 function input(){    var b = window.confirm("确认要删除本条信息!");    if(b==true){     ret ...