Cassandra error Unit cassandra.service entered failed state

Updated: Jan 30

We get this error when we start our Cassandra recently. New main PID x does not belong to service, and PID file is not owned by root. Refusing. After checking, we found that it is a bug for cassandra startup file.


Error Log for Unit cassandra.service entered failed state

systemctl status cassandra cassandra.service - LSB: distributed storage system for Aug 09 17:20:26 desktop43.example.com cassandra[2463]: Starting Cassandra: OK Aug 09 17:20:26 desktop43.example.com systemd[1]: New main PID 2545 does not belong to service, and PID file is not owned by root. Refusing. Aug 09 17:20:26 desktop43.example.com systemd[1]: New main PID 2545 does not belong to service, and PID file is not owned by root. Refusing. Aug 09 17:20:26 desktop43.example.com systemd[1]: Failed to start LSB: distributed storage system for structured data. Aug 09 17:20:26 desktop43.example.com systemd[1]: Unit cassandra.service entered failed state. Aug 09 17:20:26 desktop43.example.com systemd[1]: cassandra.service failed.


Fix Unit cassandra.service entered failed state

The fix for systemd CVE-2018-16888 required changes to init scripts, so that PID files end up owned by the "root" user. Here is the fix for this issue. https://issues.apache.org/jira/browse/CASSANDRA-15273


After this file /etc/rc.d/init.d/cassandra is changed, the issue is gone.


OS vulnerability:https://access.redhat.com/security/cve/cve-2018-16888

Cassandra bug:https://issues.apache.org/jira/browse/CASSANDRA-15273

script fix: https://issues.apache.org/jira/secure/attachment/12993922/0001-Fix-Red-Hat-init-script-on-newer-systemd-versions.patch

file: /etc/rc.d/init.d/cassandra



61 views

Join our mail group. Get a free Linux account on Cloud.

Never miss a post!

Want a free Linux account?  This account can be used to login to our cloud server and practice Linux commands.

 
kamateravps.gif
topbackgroud.png

✔ Linux Commands   ✔ Linux Skills    ✔ LinuxPerformance   ✔ Linux Interview

Some articles are from the public internet. If you find your article misused or undesired here and you don't want us to display it, please let us know and we'll remove it immediately.