Manage Apache Cassandra

Start or stop Cassandra manually or as a service.

3 minute read

On Linux, when you select to install Cassandra using the API Gateway installer as part of a Standard or Complete setup, Cassandra starts automatically. To start or stop Cassandra manually or as a service, perform the steps described in this page.

Manage Apache Cassandra

This section explains how to start and stop Cassandra.

Start Apache Cassandra

To start Cassandra in the background, change to the bin directory and run the following command:


To start Cassandra in the foreground, run the following command:

./cassandra -f

For more details, see Running Cassandra in the Apache Cassandra Wiki.

Start Cassandra as a service

To install Cassandra as a service, you must install and configure the appropriate startup script for your system. For example, see the following example startup scripts:

You must have root or sudo permissions to start Cassandra as a service. For example, typically the command to start Cassandra as a service is as follows:

sudo service cassandra start

For more details on how to configure services, see this Knowledge Base article in the Axway Support site.

Stop Cassandra

  1. Find the Cassandra Java process ID (PID):

    ps auwx | grep cassandra
  2. Run the following command:

    sudo kill *pid*

Stop Cassandra as a service

You must have root or sudo permissions to stop the Cassandra service as follows:

sudo service cassandra stop

Connect to API Gateway for the first time

Connecting to API Gateway depends on your operating system and installation setup type (Standard, Complete, or Custom).

Standard or Complete setup

If you installed a default Standard or Complete setup (both include the QuickStart tutorial), Cassandra is installed on the same host, and listens on localhost by default. API Gateway runs on the same host and connects to Cassandra by default.

Custom setup

If you installed a Custom setup and did not select the Quickstart tutorial, you must update the API Gateway Cassandra client configuration as follows:

  1. Open the API Gateway group configuration in Policy Studio.
  2. Select Server Settings > Cassandra > Authentication, and set the Cassandra username/password (default is cassandra/cassandra).
  3. Select Server Settings > Cassandra > Hosts. Add an address for the Cassandra node. You can enter an IP address or host name.
  4. Deploy the configuration to the API Gateway group.

For more details on configuring Server Settings in the Policy Studio client, see Cassandra Settings.

For details on updating the Cassandra server configuration, see Configure a highly available Cassandra cluster.

Further details

For more details on Apache Cassandra, see the following:

Last modified November 18, 2021: RMF-220 update link (#2155) (128e843c)