housepower / ckman

This is a tool which used to manage and monitor ClickHouse database
Apache License 2.0
433 stars 108 forks source link

集群新增节点报错 #286

Closed sryibing closed 8 months ago

sryibing commented 8 months ago

ckman版本:v2.3.6 clickhouse版本:xxx-22.8.21.38 安装方式:rpm安装 操作方式: 1.创建两个节点,双副本,安装正常 2.新建表,并插入数据,双副本数据正常。 3.新增分片节点,安装失败,报错原因: 2023.12.22 17:18:43.670860 [ 40331 ] {16e2e74f-5a58-4ad6-805a-15b17f6efe88} TCPHandler: Code: 516. DB::Exception: Received from 10.30.140.210:9000. DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name. Stack trace:

  1. DB::Exception::Exception(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, int, bool) @ 0xa3f9b5a in /usr/bin/clickhouse
  2. DB::AccessControl::authenticate(DB::Credentials const&, Poco::Net::IPAddress const&) const @ 0x13d2acd6 in /usr/bin/clickhouse
  3. DB::Session::authenticate(DB::Credentials const&, Poco::Net::SocketAddress const&) @ 0x14fa9f75 in /usr/bin/clickhouse
  4. DB::TCPHandler::receiveHello() @ 0x15c8fb6f in /usr/bin/clickhouse
  5. DB::TCPHandler::runImpl() @ 0x15c8889b in /usr/bin/clickhouse
  6. DB::TCPHandler::run() @ 0x15c9ddf9 in /usr/bin/clickhouse
  7. Poco::Net::TCPServerConnection::start() @ 0x18a0c9f3 in /usr/bin/clickhouse
  8. Poco::Net::TCPServerDispatcher::run() @ 0x18a0dd4d in /usr/bin/clickhouse
  9. Poco::PooledThread::run() @ 0x18bd06a9 in /usr/bin/clickhouse
  10. Poco::ThreadImpl::runnableEntry(void*) @ 0x18bcdf62 in /usr/bin/clickhouse
  11. start_thread @ 0x81ca in /usr/lib64/libpthread-2.28.so
  12. __clone @ 0x39e73 in /usr/lib64/libc-2.28.so . (AUTHENTICATION_FAILED), Stack trace (when copying this message, always include the lines below):

报错原因我看了下,是密码不对,但是除了创建角色设置密码后,新增节点操作无需输入密码,那这里的密码报错是什么原因导致呢?

YenchangChan commented 8 months ago

新增节点后需要同步表schema到新节点,采用的是在新增节点上remote连接已有节点进行同步的,这个环节怀疑是ck本身有问题,一般多尝试几次就会成功,后续会修复。

YenchangChan commented 8 months ago

修复方案: 先直连已有节点查到schema建表语句,然后在新节点上执行,避免使用remote

sryibing commented 8 months ago

你好,我按照你的方式试了下,还是失败,我试着创建集群成功后不建表,直接新增节点,但是最终结果还是新增节点报错,报错原因跟上述一致,但是服务器我查了下是已经搭建成功了(除了表未同步),现在的问题是出在同步表这块,页面上是否能在搭建集群成功后,就显示新增成功,至于同步表,自动失败的话,可以手动同步。

YenchangChan commented 8 months ago

fixed by #287 https://github.com/housepower/ckman/commit/4041bd3c954ceb9e7943e00980abf2e928a90385