DataStax Enterprise 3.0 Documentation

Starting and stopping DataStax Enterprise

This documentation corresponds to an earlier product version. Make sure this document corresponds to your version.

Latest DSE documentation | Earlier DSE documentation

After you have installed and configured DSE on one or more nodes, you are ready to start your cluster starting with the seed nodes. In a mixed-workload DSE cluster, you must start the analytics seed node first.

Packaged installations include startup and stop scripts for running DSE as a service. Binary packages do not.

Starting DataStax Enterprise as a stand-alone process

If running a mixed-workload cluster, determine which nodes to start as analytics, Cassandra, and search nodes. Begin with the seed nodes first - analytics seed node, followed by the Cassandra seed node - then start the remaining nodes in the cluster one at a time. For additional information, see Multiple data center deployment.

To start DataStax Enterprise as a stand-alone process:

From the install directory:

  • Analytics node: bin/dse cassandra -t

  • Real-time Cassandra node: bin/dse cassandra

  • Solr node: bin/dse cassandra -s

    Note

    DataStax does not support using the -t search tracker option in combination with the -s option to mark the node for Hadoop analytics and search.

To check that your ring is up and running (from the install directory):

$ bin/nodetool ring -h localhost

Starting DataStax Enterprise as a service

Packaged installations provide startup scripts in /etc/init.d for starting DSE as a service.

For mixed-workload clusters, nodes that are Cassandra-only can simply start the DSE service (skip step 1).

To start DataStax Enterprise as a service:

  1. Edit the /etc/default/dse file, and then add the appropriate line to this file, depending on the type of node you want:

    • HADOOP_ENABLED=1 - Designates the node as DataStax Enterprise analytics and starts the Hadoop Job Tracker and Task Tracker services.
    • SOLR_ENABLED=1 - Starts the node as DSE Enterprise Search/Solr node.

    Note

    DataStax does not support using the SOLR_ENABLED and HADOOP_ENABLED options to mark the same node for both search and Hadoop analytics.

  2. Start the DSE service:

    sudo service dse start
    
  3. To check if your cluster is up and running:

    nodetool ring -h localhost
    

On RHEL and CentOS, the DSE service runs as a Java process. On Debian and Ubuntu systems, the DSE service runs as a jsvc process.

Stopping a DataStax Enterprise node

To speed up the restart process, before stopping the dse service or the Cassandra or DataStax Enterprise process, run nodetool drain. This step writes the current memtables to disk. When you restart the node, Cassandra does not need to read through the commit log. If you have durable writes set to false, which is unlikely, there is no commit log and you must drain the node to prevent losing data.

To stop the service on a node:

nodetool drain -h <host name>
sudo service dse stop

To stop the stand-alone process on a node:

To stop a node, find the DataStax Enterprise Java process ID (PID) and stop the process using its PID number. From the install location:

bin/nodetool drain -h <host name>
ps auwx | grep dse
bin/dse cassandra-stop -p <PID> ## Use sudo if necessary.