You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Severin Leonhardt (JIRA)" <ji...@apache.org> on 2015/12/22 09:20:46 UTC
[jira] [Created] (CASSANDRA-10920) Let systemd know if Cassandra is
running
Severin Leonhardt created CASSANDRA-10920:
---------------------------------------------
Summary: Let systemd know if Cassandra is running
Key: CASSANDRA-10920
URL: https://issues.apache.org/jira/browse/CASSANDRA-10920
Project: Cassandra
Issue Type: Improvement
Reporter: Severin Leonhardt
Priority: Minor
Checking the status of the Cassandra service on CentOS 7 shows this:
{noformat}
$ systemctl status cassandra
● cassandra.service - SYSV: Starts and stops Cassandra
Loaded: loaded (/etc/rc.d/init.d/cassandra)
Active: active (exited) since Fri 2015-12-18 13:30:02 CET; 3 days ago
Docs: man:systemd-sysv-generator(8)
...
{noformat}
The same is shown after the Cassandra process is killed or dies by itself. Notice this part: _Active: active (exited)_
Starting Cassandra through {{systemctl start cassandra}} will not work, because systemd still thinks the service is running.
According to the [systemd documentation regarding compatibility with SysV|http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities/] this is expected behavior. Systemd doesn't know the PID of the Cassandra process and thus can't check if the service is running or not.
It is suggested to add the following to the SysV script header comment:
{noformat}
# pidfile: /var/run/cassandra/cassandra.pid
{noformat}
After adding this manually systemd correctly detected the state of the Cassandra process on our machines.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)