Clickhouse 开始出现错误:无法获取管道容量

Posted

技术标签:

【中文标题】Clickhouse 开始出现错误:无法获取管道容量【英文标题】:Clickhouse starts with error: Cannot get pipe capacity 【发布时间】:2019-08-28 15:36:56 【问题描述】:

使用 apt-get 安装 clickhouse 后,我尝试启动它

sudo -u clickhouse clickhouse-server --config-file=/etc/clickhouse-server/config.xml

但它不会以错误开头

Application: DB::ErrnoException: Cannot get pipe capacity, errno: 22, strerror: Invalid argument

完整日志:

Include not found: clickhouse_remote_servers
Include not found: clickhouse_compression
Logging trace to /var/log/clickhouse-server/clickhouse-server.log
Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log
Logging trace to console
2019.08.28 11:26:50.255115 [ 1 ]  <Information> : Starting ClickHouse 19.13.3.26 with revision 54425
2019.08.28 11:26:50.255253 [ 1 ]  <Information> Application: starting up
2019.08.28 11:26:50.260659 [ 1 ]  <Debug> Application: Set max number of file descriptors to 1048576 (was 1024).
2019.08.28 11:26:50.260715 [ 1 ]  <Debug> Application: Initializing DateLUT.
2019.08.28 11:26:50.260733 [ 1 ]  <Trace> Application: Initialized DateLUT with time zone 'America/New_York'.
2019.08.28 11:26:50.261086 [ 1 ]  <Debug> Application: Configuration parameter 'interserver_http_host' doesn't exist or exists and empty. Will use 'virtual.rysev' as replica host.
2019.08.28 11:26:50.264129 [ 1 ]  <Debug> ConfigReloader: Loading config '/etc/clickhouse-server/users.xml'
Include not found: networks
2019.08.28 11:26:50.265577 [ 1 ]  <Information> Application: Uncompressed cache size was lowered to 512.00 MiB because the system has low amount of memory
2019.08.28 11:26:50.265908 [ 1 ]  <Information> Application: Mark cache size was lowered to 512.00 MiB because the system has low amount of memory
2019.08.28 11:26:50.265955 [ 1 ]  <Information> Application: Loading metadata from /var/lib/clickhouse/
2019.08.28 11:26:50.267614 [ 1 ]  <Debug> Application: Loaded metadata.
2019.08.28 11:26:50.267981 [ 1 ]  <Information> Application: Shutting down storages.
2019.08.28 11:26:50.268287 [ 1 ]  <Debug> Application: Shutted down storages.
2019.08.28 11:26:50.269839 [ 1 ]  <Debug> Application: Destroyed global context.
2019.08.28 11:26:50.270149 [ 1 ]  <Error> Application: DB::ErrnoException: Cannot get pipe capacity, errno: 22, strerror: Invalid argument
2019.08.28 11:26:50.270181 [ 1 ]  <Information> Application: shutting down
2019.08.28 11:26:50.270194 [ 1 ]  <Debug> Application: Uninitializing subsystem: Logging Subsystem
2019.08.28 11:26:50.270265 [ 3 ]  <Information> BaseDaemon: Stop SignalListener thread

请帮忙

【问题讨论】:

能否提供config.xml,集群拓扑描述? 平台是什么(操作系统和版本,你用docker吗?)?您使用自定义构建吗?你在哪里下载的包?您究竟是如何运行 ClickHouse 的? 【参考方案1】:

您可以尝试运行以下命令:

systemctl enable clickhouse-server
systemctl start clickhouse-server

您也可以尝试弄清楚 clickhouse-server 的正确运行方式

less /lib/systemd/system/clickhouse-server.service

【讨论】:

tnx,但问题仍然存在 您需要将 clickhouse-server 作为守护进程启动,还是只需要手动运行 clickhouse-server 二进制文件?【参考方案2】:

在 CentOS 7 docker 映像上安装 clickhouse 时出现相同的错误消息,该映像是在 CentOS 6 主机(内核-2.6.32)上启动的。

这个问题似乎与 clickhouse 19.12 的变化有关:

TraceCollector.cpp:52
int pipe_size = fcntl(trace_pipe.fds_rw[1], F_GETPIPE_SZ);

F_GETPIPE_SZ 在 Linux kernel >=2.6.35 中可用,所以这可能是问题所在。

因此您可以通过存储库手动安装旧版本的 clickhouse 或更新您的内核。

rpm:https://repo.yandex.ru/clickhouse/rpm/stable/x86_64/

deb:https://repo.yandex.ru/clickhouse/deb/stable/main/

我尝试了 clickhouse 版本 19.11.8.46-2,它立即工作。

【讨论】:

以上是关于Clickhouse 开始出现错误:无法获取管道容量的主要内容,如果未能解决你的问题,请参考以下文章

从 ClickHouse 访问 HDFS HA 集群失败,出现错误 HdfsConfigNotFound

错误:无法初始化类 ru.yandex.clickhouse.ClickHouseUtil

ClickHouse

无法使用 node.js 在 quickblox 上上传内​​容

媒体转码截图和工作流场景常见问题系列一

Clickhouse Alter操作造成zk连接丢失的问题分析