Clickhouse报错:DB::Exception: Cannot lock file /var/lib/clickhouse/status

一、问题描述

clickhouse启动后,本身也可以访问没有问题,而且外部也可以访问,但是查看其error日志,发现一直有报错

tail -f clickhouse-server/clickhouse-server.err.log
结果:
2020.10.07 19:05:32.720350 [ 8150 ] {} <Error> Application: DB::Exception: Cannot lock file /var/lib/clickhouse/status. Another server instance in same directory is already running.
2020.10.07 19:06:02.970577 [ 8217 ] {} <Error> Application: DB::Exception: Cannot lock file /var/lib/clickhouse/status. Another server instance in same directory is already running.
2020.10.07 19:06:33.220827 [ 8632 ] {} <Error> Application: DB::Exception: Cannot lock file /var/lib/clickhouse/status. Another server instance in same directory is already running.
2020.10.07 19:07:03.471225 [ 8706 ] {} <Error> Application: DB::Exception: Cannot lock file /var/lib/clickhouse/status. Another server instance in same directory is already running.
2020.10.07 19:07:33.720339 [ 8880 ] {} <Error> Application: DB::Exception: Cannot lock file /var/lib/clickhouse/status. Another server instance in same directory is already running.
...

一直不停止,所以这个很尬尴。

二、问题解决

经过探查,可能是因为之前有clickhouse-server启动2次导致,所以,直接依据日志目录,查看这个status文件

cat /var/lib/clickhouse/status
ps -ef | grep clickhouse-server
删除对应clickhouse-server
kill -9 $pid
systemctl start clickhouse-server

然后,重新查看错误日志,就ok了

tail -f clickhouse-server/clickhouse-server.err.log
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值