RedHat systemd configuration

Starting with DSE version 6.8.2, installations support systemd for RHEL-based and compatible systems.

The system installs the following units in /usr/lib/systemd/system:

  • dse-all.target: starts DSE nodes

  • dse-shutdown.target: stops DSE nodes

The system also installs a dse@.service template in /usr/share/dse/templates. It serves as a template unit for all DSE node instances running on the host OS under the cassandra user. The dse add-node command and the /usr/share/dse/tools/dse-convert-to-systemd helper script use that template.

Once you enable dse-all.target, the dse add-node command creates and enables systemd service for new nodes, and creates init.d scripts to redirect lifecycle commands to systemctl.

Enable DSE systemd units

By default, systemd units are not enabled. Previous init.d scripts remain in effect.

On systems that have systemd, you can still manipulate the old init.d services using systemd commands such as systemctl start dse.

  1. Stop the DSE init.d service:

    sudo service dse stop
  2. Enable dse-all.target:

    sudo systemctl enable dse-all.target

    After enabling dse-all.target, DSE nodes automatically start as part of the multi-user target on each reboot.

  3. On each node run:

    sudo /usr/share/dse/tools/dse-convert-to-systemd full-node-id

    The node address, full-node-id, must be the fully-qualified node ID and include the dse- prefix. The default node ID is dse unless you configure other nodes.

    /usr/share/dse/tools/dse-convert-to-systemd dse-node1

    The dse-convert-tosystemd script makes the following changes:

    • Creates and enables systemd units for DSE nodes in /etc/systemd/system/.

    • Modifies the DSE init.d script to redirect lifecycle commands to systemctl.

DSE systemd operations

systemd commands include:

  • Start all DSE nodes:

    systemctl start dse-all.target
  • Stop all DSE nodes:

    systemctl start dse-shutdown.target
  • Start one DSE node:

    systemctl start full-node-id
  • Stop one DSE node:

    systemctl stop full-node-id

The node address, full-node-id, must be the fully-qualified node ID and include the dse- prefix. The default node ID is dse unless you configure other nodes.

The default start timeout is 10 minutes and the default stop timeout is 30 seconds. Adjust these values by editing the corresponding unit files.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com