-
Notifications
You must be signed in to change notification settings - Fork 8.3k
clickhouse-server unlinks --pid-file before checking /status file #3501
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-need-infoWe need extra data to continue (waiting for response). Either some details or a repro of the issue.We need extra data to continue (waiting for response). Either some details or a repro of the issue.
Description
clickhouse-server unlink --pid-file before checking /status file and it leads to that exception:
Cannot lock file .../status. Another server instance in same directory is already running.
test case:
$ killall clickhouse-server
$ clickhouse-server --daemon --config-file=/etc/clickhouse-server/config.xml --pid-file=/tmp/test_pid.pid
$ cat /tmp/test_pid.pid
22867
$ cat /var/lib/clickhouse/status
PID: 22867
Started at: 2018-10-30 18:29:23
Revision: 54409
# till now everything's ok
# now let's try to run second time:
$ clickhouse-server --daemon --config-file=/etc/clickhouse-server/config.xml --pid-file=/tmp/test_pid.pid
# status file is still there
$ cat /var/lib/clickhouse/status
PID: 22867
Started at: 2018-10-30 18:29:23
Revision: 54409
# but pid file disappeared :\
$ cat /tmp/test_pid.pid
cat: /tmp/test_pid.pid: No such file or directory
# server is still running...
$ pidof clickhouse-server
22867Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasest-need-infoWe need extra data to continue (waiting for response). Either some details or a repro of the issue.We need extra data to continue (waiting for response). Either some details or a repro of the issue.