当前位置:   article > 正文

clickhouse突然启动不起来问题排查_clickhouse 无法启动__list_iterator

clickhouse 无法启动__list_iterator) @ 0xc8c9a88 in

 场景:

在实现postgreql数据迁移到clickhouse中,想使用MaterializedPostgreSQL的功能实现,但是中途clickhouse突然挂了,就再启动不了了。

 现象:

systemctl start clcikhouse-server启动报错

  1. [root@localhost clickhouse-server]# systemctl status clickhouse-server
  2. ● clickhouse-server.service - ClickHouse Server (analytic DBMS for big data)
  3. Loaded: loaded (/etc/systemd/system/clickhouse-server.service; enabled; vendor preset: disabled)
  4. Active: activating (auto-restart) (Result: exit-code) since 二 2024-03-19 10:46:43 CST; 5s ago
  5. Process: 22672 ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=/run/clickhouse-server/clickhouse-server.pid (code=exited, status=232/ADDRESS_FAMILIES)
  6. Main PID: 22672 (code=exited, status=232/ADDRESS_FAMILIES)

启动日志分析

journalctl -xe

  1. [root@localhost clickhouse-server]# journalctl -xe
  2. 319 10:47:13 localhost.localdomain clickhouse-server[22714]: Processing configuration file '/etc/clickhouse-server/config.xml'.
  3. 319 10:47:13 localhost.localdomain clickhouse-server[22714]: Logging trace to /var/log/clickhouse-server/clickhouse-server.log
  4. 319 10:47:13 localhost.localdomain clickhouse-server[22714]: Poco::Exception. Code: 1000, e.code() = 13, Access to file denied: /var/log/clickhouse-server/clickhouse-server.log, Stack trace (when co
  5. 319 10:47:13 localhost.localdomain clickhouse-server[22714]: 0.

 Access to file denied:/var/log/clickhouse-server/clickhouse-server.log

关键报错提示访问这个日志文件被拒绝了。

原因

原因是项目挂了后,我把var/log/clickhouse-server下的日志全部删除了,然后手动创建的如下文件

/var/log/clickhouse-server/clickhouse-server.log

var/log/clickhouse-server/clickhouse-server.err.log

复盘

我当时是这么赋予权属的

chown root:root /var/log/clickhouse-server/clickhouse-server.log

chown root:root var/log/clickhouse-server/clickhouse-server.err.log

错就错在这里了!!!

配置文件clickhouse.xml的权属都是clickhouse,且在config.xml中有日志的具体配置路径

然后改成

chown clickhouse:clickhouse var/log/clickhouse-server/clickhouse-server.err.log

chown clickhouse:clickhouse var/log/clickhouse-server/clickhouse-server.log

 重启服务OK了

systemctl start clickhouse-server

systemctl status clickhouse-server

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/301536
推荐阅读
相关标签
  

闽ICP备14008679号