ClickHouse icon indicating copy to clipboard operation
ClickHouse copied to clipboard

Help: Another server instance in same directory is already running

Open lzy305 opened this issue 7 years ago • 6 comments

when i run a query. Service restart. And then I see the error log. Message:

2019.05.08 22:09:40.754275 [ 1 ] {} Application: DB::Exception: Cannot lock file /data/clickhouse/data/status. Another server instance in same directory is already running. 2019.05.08 22:10:11.005677 [ 1 ] {} Application: DB::Exception: Cannot lock file /data/clickhouse/data/status. Another server instance in same directory is already running. 2019.05.08 22:20:04.191684 [ 1 ] {} Application: DB::Exception: Cannot lock file /data/clickhouse/data/status. Another server instance in same directory is already running. 2019.05.08 22:20:34.507849 [ 1 ] {} Application: DB::Exception: Cannot lock file /data/clickhouse/data/status. Another server instance in same directory is already running.

lzy305 avatar May 08 '19 14:05 lzy305

So probably ClickHouse server is already running? Check the contents /data/clickhouse/data/status file

filimonov avatar May 08 '19 15:05 filimonov

I Solve it. THANK you!

lzy305 avatar May 09 '19 15:05 lzy305

I am also facing the same problem.

@lzy305 Can you help us how did you solve this?

tvsanthoshkumar avatar Oct 30 '20 17:10 tvsanthoshkumar

Got same issue, how to solve it ? @lzy305

sliontc avatar Dec 09 '20 12:12 sliontc

@sliontc Check the logs.

If it will not help, run clickhouse-server manually with the command:

sudo -u clickhouse /usr/bin/clickhouse server --config-file /etc/clickhouse-server/config.xml

alexey-milovidov avatar Dec 10 '20 21:12 alexey-milovidov

I meet this question too.the real reason is that we had started one more clickhouse-server. if you " ps -ef | grep clickhouse-server " and "service clickhouse-server status" you will find the pid is different.so you just need kill the started pid and restart clickhouse-server
this is my solution cat ./status ps -ef | grep clickhouse-server kill -9 $pid service clickhouse-server start

ddoneGit avatar Dec 24 '20 07:12 ddoneGit