Starting DataStax Enterprise as a service

Starting the DataStax Enterprise service when DataStax Enterprise was installed from the DataStax Installer with the Services option or from a package.

Packaged installations provide start-up scripts in /etc/init.d for starting DataStax Enterprise as a service.

For Cassandra-only nodes in mixed-workload clusters or BYOH nodes, skip step 1.

The following entries set the type of node:
  • HADOOP_ENABLED=1 designates the node as a DSE Hadoop node and starts the Hadoop Job Tracker and Task Tracker services.
  • SOLR_ENABLED=1 starts the node as DSE Search node.
  • SPARK_ENABLED=1 starts the node as DSE Enterprise Spark node.
Note: No entry is the same as disabling it.

Procedure

  1. Edit the /etc/default/dse file, and then edit the appropriate line in this file, depending on the type of node you want:
    Cassandra nodes
    Transactional nodes.
    HADOOP_ENABLED=0
    SOLR_ENABLED=0
    SPARK_ENABLED=0
    BYOH nodes
    A Cassandra node that runs DSE Analytics with a separate Hadoop cluster from a vendor other than DataStax.
    HADOOP_ENABLED=0
    SOLR_ENABLED=0
    SPARK_ENABLED=0
    DSE Hadoop nodes
    Spark only and Spark + Integrated Hadoop (DSE Hadoop) nodes.
    HADOOP_ENABLED=1
    SOLR_ENABLED=0
    SPARK_ENABLED=0
    DSE Search nodes
    DSE Search (DataStax Enterprise Search) simplifies using search applications for data that is stored in a Cassandra database.
    SOLR_ENABLED=1
    HADOOP_ENABLED=0
    SPARK_ENABLED=0
    Spark nodes
    DSE Analytics with Spark. Spark is the default mode when you start an analytics node in a packaged installation.
    SPARK_ENABLED=1
    HADOOP_ENABLED=0
    SOLR_ENABLED=0
    SearchAnalytics nodes
    An integrated DSE SearchAnalytics cluster allows analytics jobs to be performed using search queries.
    SPARK_ENABLED=1
    SOLR_ENABLED=1
    HADOOP_ENABLED=0
  2. Start DataStax Enterprise and the DataStax Agent:
    $ sudo service dse start
    $ sudo service datastax-agent start
    Starting DataStax Enterprise as a service runs a script that sets up the environment and launches the DSE service. After the DSE service is launched, the script verifies if the service is running. It is possible for the DSE service to take a few seconds to start, and this error might display:
    WARNING: Timed out while waiting for DSE to start. 
    However, this error does not necessarily mean that the DSE service failed to start. Check the log files, for example /var/log/cassandra/system.out.
  3. To wait longer until the service is declared not to launch successfully, you can change the number of times to check if the DSE service is running. The DSE start script checks if the DSE service is running once per second, so the number of checks is equal to the number of seconds. To configure the number of times to check if the DSE service is running, uncomment and edit the WAIT_FOR_START option in the /etc/default/dse file, and then restart the DSE service:
    # Uncomment if you want longer/shorter waits checking if the service is up
    WAIT_FOR_START=14
  4. To check if your cluster is up and running:
    $ nodetool status
    On Enterprise Linux systems, the DataStax Enterprise service runs as a Java process.