Start DataStax Enterprise as a service
Steps for starting the DataStax Enterprise (DSE) service when DSE was installed from RHEL or Debian packages.
|
You can also use OpsCenter to start and stop nodes. See Start DSE on a node and Stop DSE on a node. |
All nodes types are DSE nodes and run the database.
Considerations for starting a cluster
Be aware of the following when starting a DSE cluster:
- Nodes must be segregated by datacenters
-
Transactional, DSE Search, DSE Analytics, and SearchAnalytics nodes must be in separate datacenters. For example, in a cluster with both DSE Search and transactional nodes, all DSE Search nodes must be in a one or more search datacenters and all transactional nodes must be in one or more datacenters.
DSE Graph can be enabled on any node in any datacenter.
- Deploying a mixed-workload cluster
-
When deploying one or more datacenters for each type of node, first determine which nodes to start as transactional, analytic, DSE Graph only, DSE Graph plus other types, DSE Search, and SearchAnalytics nodes. Deploy in this order:
-
Analytic seed nodes.
-
Transactional or DSE Graph-only seed nodes.
-
DSE Search seed nodes.
-
SearchAnalytics nodes.
-
Remaining nodes one at a time. See Initializing multiple datacenters per workload type.
-
- DSE Analytics nodes
-
Before starting DSE Analytics nodes, ensure that the replication factor is configured correctly for the analytics keyspaces. Every time you add a new datacenter, you must manually increase the replication factor of the dse_leases keyspace for the new DSE Analytics datacenter.
Start up commands
-
If DSE is running, stop the node.
-
Set the node type in the
/etc/default/dsefile.For example, to set a Spark node:
SPARK_ENABLED=1 SOLR_ENABLED=0 GRAPH_ENABLED=0To start multiple types, set each corresponding environment variable to
1. For example, to start a Spark Analytics, DSE Graph, and DSE Search node:SPARK_ENABLED=1 GRAPH_ENABLED=1 SOLR_ENABLED=1Node type environment variable options Type Setting Example Transactional-only
Set all types to
0or omit them.Explicit form:
SPARK_ENABLED=0 SOLR_ENABLED=0 GRAPH_ENABLED=0Implicit form:
# No node type entriesDSE Graph node
GRAPH_ENABLED=1SPARK_ENABLED=0 SOLR_ENABLED=0 GRAPH_ENABLED=1Spark node (also starts the Spark Master service)
SPARK_ENABLED=1SPARK_ENABLED=1 SOLR_ENABLED=0 GRAPH_ENABLED=0DSE Search node
SOLR_ENABLED=1SPARK_ENABLED=0 SOLR_ENABLED=1 GRAPH_ENABLED=0BYOS (Bring-your-own-Spark) nodes
Set all types to
0or omit them.This is the same as the Transactional-only setting because BYOS nodes run in separate Spark cluster from a vendor other than DataStax.
If the node is only BYOS, set all types to
0or omit them:SPARK_ENABLED=0 SOLR_ENABLED=0 GRAPH_ENABLED=0If the type is both BYOS and another type, set only the other type to
1. For example, if the type is both DSE Graph and BYOS:SPARK_ENABLED=0 SOLR_ENABLED=0 GRAPH_ENABLED=1SearchAnalytics nodes
Set both
SPARKandSOLRto1.An integrated DSE SearchAnalytics cluster allows analytics jobs to be performed using CQL queries.
SPARK_ENABLED=1 SOLR_ENABLED=1If a type isn’t specified, then it isn’t enabled. For example,
SOLR_ENABLED=0is the same as omitting theSOLR_ENABLEDline. This means you can express the type is shorthand by omitting any disabled types. For example, if you want to start node with Graph but not Search or Analytics, then you only need to setGRAPH_ENABLED=1.Start-up scripts are also available in
/etc/init.d/. -
Start DSE:
sudo service dse startIf the following error appears, see DSE cannot start with yaml parsing error.
WARNING: Timed out while waiting for {product-short} to start. -
Verify that the cluster is running:
nodetool statusThe result of the nodetool command includes the node type, status, and state.
For a transactional node running in a normal state (
UN) with virtual nodes (vnodes) enabled, the result should be similar to the following:Datacenter: Cassandra ===================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns Host ID Rack UN 127.0.0.1 82.43 KB 128 ? 40725dc8-7843-43ae-9c98-7c532b1f517e rack1For a running node in a normal state (
UN) with DSE Analytics without vnodes enabled, the result should be similar to the following:Datacenter: Analytics ===================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Owns Host ID Token Rack UN 172.16.222.136 103.24 KB ? 3c1d0657-0990-4f78-a3c0-3e0c37fc3a06 1647352612226902707 rack1If DSE has problems starting, visit DataStax Support for troubleshooting articles on starting DSE.