Cassandra error Unit cassandra.service entered failed state

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.

David Cao
David Cao

David is a Cloud & DevOps Enthusiast. He has years of experience as a Linux engineer. He had working experience in AMD, EMC. He likes Linux, Python, bash, and more. He is a technical blogger and a Software Engineer. He enjoys sharing his learning and contributing to open-source.

Articles: 275

Leave a Reply

Your email address will not be published. Required fields are marked *