Created
September 18, 2015 14:01
-
-
Save s0undt3ch/969b744d3d7b88c29cba to your computer and use it in GitHub Desktop.
CentOS 7 Cassandra systemd service file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/lib/systemd/system/cassandra.service | |
[Unit] | |
Description=Cassandra | |
After=network.target | |
[Service] | |
PIDFile=/var/run/cassandra/cassandra.pid | |
User=cassandra | |
Group=cassandra | |
ExecStart=/usr/sbin/cassandra -f -p /var/run/cassandra/cassandra.pid | |
StandardOutput=journal | |
StandardError=journal | |
LimitNOFILE=100000 | |
LimitMEMLOCK=infinity | |
LimitNPROC=32768 | |
LimitAS=infinity | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Tested on CentOS 8, works!
On my sysV file I call the following command when stopping cassandra:
nodetool -u cass** -pw pass** -h 127.0.0.1 decommission
Do I need to do this in systemd file as a ExecStopPost command?
Should be useful in forking mode:
TimeoutStartSec=300
But foreground mode seems more stable (imho).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After some tries I've created upgraded version of this unit file.
Changes:
Type=forking
because-p
works only without-f
Tested with cassandra 3.11.5 & centos 7.7