Manage Apache Cassandra
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.
NoteBefore you start Cassandra, you must follow the best practices in Apache Cassandra Best Practices to achieve a stable Cassandra environment, and to prevent data integrity and performance issues.
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:
cd CASSANDRA_HOME/bin ./cassandra
To start Cassandra in the foreground, run the following command:
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.
Find the Cassandra Java process ID (PID):
ps auwx | grep cassandra
Run the following command:
sudo kill *pid*
Stop Cassandra as a service
You must have
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.
If you installed a Custom setup and did not select the Quickstart tutorial, you must update the API Gateway Cassandra client configuration as follows:
- Open the API Gateway group configuration in Policy Studio.
- Select Server Settings > Cassandra > Authentication, and set the Cassandra username/password (default is
- Select Server Settings > Cassandra > Hosts. Add an address for the Cassandra node. You can enter an IP address or host name.
- 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.
For more details on Apache Cassandra, see the following: