pavs
pavs

Reputation: 141

Failed to start cassandra.service: Unit cassandra.service not found

I uninstalled cassandra 3.10 and reinstalled 3.11 when i starting cassandra through sudo service cassandra start

getting error

Failed to start cassandra.service: Unit cassandra.service not found.

Upvotes: 1

Views: 6277

Answers (2)

Luciana Oliveira
Luciana Oliveira

Reputation: 1137

You can create a cassandra.service in /etc/systemd/system as below:

[Unit]
Description=Cassandra Cluster Node Daemon

[Service]
Type=forking
user=cassandra
ExecStart=/etc/cassandra/bin/cassandra
ExecStopPost=/usr/bin/rm -rf /data/cassandra/saved_caches
SuccessExitStatus=143

[Install]
WantedBy=default.target

This is the fine result:

enter image description here

Remember that ExecStart is the cassadra's path installed.

P.S. If there isn't the cassandra user, you can create sudo adduser cassandra.

Upvotes: 0

Maybe it will help you. I've fixed my issue with the "CENTOS service fix" section

https://docs.nomagic.com/pages/viewpage.action?pageId=20841857

Upvotes: 0

Related Questions