暂无图片
clickhouse 安装后启动不了
我来答
分享
Thomas
2024-04-11
clickhouse 安装后启动不了

https://www.atlantic.net/dedicated-server-hosting/how-to-install-clickhouse-on-oracle-linux-8/

参照此文装的CLICKHOUSE, OS是ORACLE LINUX 9, 但无法启动clickhouse-server, 报错如下

root@localhost /]# systemctl status clickhouse-server
○ clickhouse-server.service
Loaded: bad-setting (Reason: Unit clickhouse-server.service has a bad unit file setting.)
Active: inactive (dead)

Apr 11 16:00:06 localhost.localdomain systemd[1]: /usr/lib/systemd/system/clickhouse-server.service:1: Assignment outside of section. Ignoring.
Apr 11 16:00:06 localhost.localdomain systemd[1]: clickhouse-server.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing.

看到配置文件下,只有systemctl daemon-reload一行,应该内容不全吧。如何补全它?
[root@localhost /]# cat /usr/lib/systemd/system/clickhouse-server.service
systemctl daemon-reload

我来答
添加附件
收藏
分享
问题补充
3条回答
默认
最新
Thomas

期待解答中

暂无图片 评论
暂无图片 有用 0
一般

你是安装的哪个版本?我找一个对应的clickhouse-server.service给你,下面是clickhouse-server-24.3.2.23.x86_64.rpm的,你可以试试

[Unit]
Description=ClickHouse Server (analytic DBMS for big data)
Requires=network-online.target
# NOTE: that After/Wants=time-sync.target is not enough, you need to ensure
# that the time was adjusted already, if you use systemd-timesyncd you are
# safe, but if you use ntp or some other daemon, you should configure it
# additionaly.
After=time-sync.target network-online.target
Wants=time-sync.target

[Service]
Type=notify

# NOTE: we leave clickhouse watchdog process enabled to be able to see OOM/SIGKILL traces in clickhouse-server.log files.
# If you wish to disable the watchdog and rely on systemd logs just add "Environment=CLICKHOUSE_WATCHDOG_ENABLE=0" line.
User=clickhouse
Group=clickhouse
Restart=always
RestartSec=30
# The following ClickHouse directives should be used instead of forcing SIGKILL by systemd:
# - shutdown_wait_unfinished_queries
# - shutdown_wait_unfinished
TimeoutStopSec=infinity
# Disable forwarding signals by watchdog, since with default systemd's
# kill-mode control-group, systemd will send signal to all process in cgroup.
Environment=CLICKHOUSE_WATCHDOG_NO_FORWARD=1
# Since ClickHouse is systemd aware default 1m30sec may not be enough
TimeoutStartSec=0
# %p is resolved to the systemd unit name
RuntimeDirectory=%p
ExecStart=/usr/bin/clickhouse-server --config=/etc/clickhouse-server/config.xml --pid-file=%t/%p/%p.pid
# Minus means that this file is optional.
EnvironmentFile=-/etc/default/%p
# Bring back /etc/default/clickhouse for backward compatibility
EnvironmentFile=-/etc/default/clickhouse
LimitCORE=infinity
LimitNOFILE=500000
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE CAP_NET_BIND_SERVICE

[Install]
# ClickHouse should not start from the rescue shell (rescue.target).
WantedBy=multi-user.target

暂无图片 评论
暂无图片 有用 0
Thomas

谢谢,我试下

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏