You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ARM64架构Linux系统运行clickhouse-local报错求助

环境信息

  • 操作系统:
Linux forlinx 4.4.189 #7 SMP Thu Nov 18 04:08:10 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
  • ClickHouse 版本:22.9.3.18

安装步骤

通过tgz包安装clickhouse-client:

LATEST_VERSION=22.9.3.18
ARCH=aarch64

tar -xzvf "clickhouse-common-static-$LATEST_VERSION-${ARCH}.tgz" \
  || tar -xzvf "clickhouse-common-static-$LATEST_VERSION.tgz"
sudo "clickhouse-common-static-$LATEST_VERSION/install/doinst.sh"

tar -xzvf "clickhouse-client-$LATEST_VERSION-${ARCH}.tgz" \
  || tar -xzvf "clickhouse-client-$LATEST_VERSION.tgz"
sudo "clickhouse-client-$LATEST_VERSION/install/doinst.sh"

执行命令及错误

执行以下clickhouse-local命令:

clickhouse-local -S "id Int64" -N "tmp_table" -q "CREATE TABLE if not exists test_batch (id Int64,EventTime Date) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventTime) ORDER BY id;INSERT INTO TABLE test_batch values(1,'2021-05-05');" --logger.console  --path /tmp/local

出现错误:

2022.10.24 14:51:16.166465 [ 6193 ] {} <Error> bool DB::(anonymous namespace)::checkPermissionsImpl(): Code: 412. DB::Exception: Can't receive Netlink response: error -2. (NETLINK_ERROR), Stack trace (when copying this message, always include the lines below):

0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0x6d51948 in /usr/bin/clickhouse
1. ? @ 0x6d7fcfc in /usr/bin/clickhouse
2. ? @ 0x6d7fee8 in /usr/bin/clickhouse
3. DB::TaskStatsInfoGetter::TaskStatsInfoGetter() @ 0x6d7f6d4 in /usr/bin/clickhouse
4. ? @ 0x6d7f494 in /usr/bin/clickhouse
5. DB::TaskStatsInfoGetter::checkPermissions() @ 0x6d7f424 in /usr/bin/clickhouse
6. DB::TasksStatsCounters::create(unsigned long) @ 0x6d783f0 in /usr/bin/clickhouse
7. DB::ThreadStatus::initPerformanceCounters() @ 0x103c5604 in /usr/bin/clickhouse
8. DB::ThreadStatus::setupState(std::__1::shared_ptr<DB::ThreadGroupStatus> const&) @ 0x103c5264 in /usr/bin/clickhouse
9. DB::CurrentThread::initializeQuery() @ 0x103c79a4 in /usr/bin/clickhouse
10. DB::BackgroundSchedulePool::attachToThreadGroup() @ 0xf5e9ee0 in /usr/bin/clickhouse
11. DB::BackgroundSchedulePool::threadFunction() @ 0xf5ea064 in /usr/bin/clickhouse
12. ? @ 0xf5eb0d8 in /usr/bin/clickhouse
13. ThreadPoolImpl<std::__1::thread>::worker(std::__1::__list_iterator<std::__1::thread, void*>) @ 0x6de5680 in /usr/bin/clickhouse
14. ? @ 0x6dea8c4 in /usr/bin/clickhouse
 (version 22.9.3.18 (official build))

注:相同操作在AMD64架构Ubuntu系统中可正常运行。

解决方案

该错误源于ClickHouse尝试通过Netlink接口获取任务统计信息,但当前aarch64架构的4.4.189内核对该接口支持不完善或权限限制,可通过以下方式解决:

  1. 禁用任务统计功能
    执行clickhouse-local时添加--disable-tasks-stats参数,跳过相关权限检查:
clickhouse-local --disable-tasks-stats -S "id Int64" -N "tmp_table" -q "CREATE TABLE if not exists test_batch (id Int64,EventTime Date) ENGINE = MergeTree() PARTITION BY toYYYYMM(EventTime) ORDER BY id;INSERT INTO TABLE test_batch values(1,'2021-05-05');" --logger.console  --path /tmp/local
  1. 升级系统内核
    若条件允许,将内核升级至5.4及以上版本,新版本aarch64内核对Netlink接口的支持更完善,可从根源解决兼容性问题。

内容的提问来源于stack exchange,提问作者weiwen yin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.15 04:35:28