DataStax Enterprise 3.1 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:

  • Real-time Cassandra node: bin/dse cassandra

  • Analytics node: bin/dse cassandra -t

  • 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:

$ cd <install_location>
$ bin/nodetool status

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 edit 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 designate 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 status
    

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, 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.

Running nodetool drain before using the cassandra-stop command to stop a stand-alone process is pointless because the command drains the node before stopping it.

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:

From the install location:

bin/dse cassandra-stop ## Use sudo if necessary

In the unlikely event that the cassandra-stop command fails because it cannot find the process DataStax Enterprise Java process ID (PID), the output instructs you to find the DataStax Enterprise Java process ID (PID) manually, and stop the process using its PID number.

ps auwx | grep dse
bin/dse cassandra-stop -p <PID>

Verify DataStax Enterprise is running

Use nodetool status as it is much less verbose than nodetool ring.

  • Packaged installs: nodetool status
  • Binary installs: <install_location>/bin/nodetool status