Another server instance in same directory is already running


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.

 

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

sudo systemctl status clickhouse-server


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM