Configure Cassandra HA on the appliance

This section describes how to configure Cassandra on the API Gateway Appliance for standalone deployments and high availability (HA) deployments with local storage or remote storage. For more information on the supported Cassandra versions and deployment architectures, see Install Apache Cassandra in the API Gateway Installation Guide.

Cassandra is supplied on the appliance using the cassandra-appliance RPM. This RPM includes the Cassandra binaries, configuration files, and init.d scripts to control the service. The cassandra-appliance RPM is dependent upon the AxwayAPIGateway-appliance-7.5.3 RPM, therefore, you must install the AxwayAPIGateway-appliance-7.5.3 RPM before the cassandra-appliance RPM. By default, the cassandra-appliance RPM is installed on version 7.5.3 of the API Gateway Appliance. However, the service is not enabled by default.

The following table summarizes the Cassandra setup required on the API Gateway Appliance for each supported Cassandra deployment architecture:

  Standalone High availability with local storage High availability with remote storage
Cassandra installation Use Cassandra preinstalled on the appliance.

Use Cassandra preinstalled on the appliance.

Install bundled Cassandra using the API Gateway installer. Alternatively, download and install Cassandra from

Cassandra startup For details, see Enable the Cassandra service.

For details, see Enable the Cassandra service.


Firewall configuration Cassandra is accessed on localhost; no need to open ports.

Configuration is required to open the required ports. For details, see Cassandra ports.

Cassandra is run remotely; no need to open ports.

Cassandra configuration after the installation Typically, no additional configuration is required.

Run the setup-cassandra script. For details, see Run the setup-cassandra script.

Configure manually (modify cassandra.yaml). For more information on configuring Cassandra, see Install Apache Cassandra in the API Gateway Installation Guide.

Enable the Cassandra service

To enable the Cassandra service on the appliance:

  1. Log in to the appliance using the default administrator account (user name admin ) and use su - to switch to the root user after logging in. You can log in locally or using SSH. For more information, see Connect to consoles and user interfaces.
  2. Run the following command to enable the Cassandra service on reboot:
# chkconfig cassandra-appliance on 

Start, stop, or restart the Cassandra service

To start, stop, or restart the Cassandra service, use the following commands:

Note   The commands follow the typical init.d script convention.
# service cassandra-appliance stop
# service cassandra-appliance start
# service cassandra-appliance restart

To retrieve the status of the service, use the following command:

# service cassandra-appliance status

A log of the Cassandra service startup is available at /opt/cassandra/logs/sstartup.log.

Change the user on the Cassandra service

By default, the Cassandra service is started by the admin user. To change this user, modify the /etc/init.d/cassandra-appliance script. Change the following line:


For example, to run the service as root, change it to:


Cassandra ports

Cassandra uses a number of TCP ports to communicate between nodes in a cluster and clients. The actual port values are configured in cassandra.yaml. The following lists the ports and their default values:

Setting name Default value Description
7000 Inter-node communication
7001 Encrypted inter-node communication
9042 Client port

In a typical HA deployment of Cassandra with local storage, you must open these ports on the firewall. For more information, see Open additional ports in the firewall.

Run the setup-cassandra script

The setup-cassandra script is bundled with the API Gateway installation and located in the API Gateway bin directory.

For example, to run the setup-cassandra script to configure the seed node:

$ cd /opt/Axway-7.5.3/apigateway/posix/bin
$ setup-cassandra --seed --own-ip= --nodes=3 --cassandra-config=/opt/cassandra/conf/cassandra.yaml

For more information on running the setup-cassandra script, see Install Apache Cassandra in the API Gateway Installation Guide.

Troubleshooting Cassandra

Cassandra does not start because of incorrect directory permissions

Problem: In some earlier builds of the appliance, the Cassandra service fails to start because the permissions on the Cassandra directories are incorrect.

Solution: Change the ownership on the Cassandra installation directory to admin. For example:

chown -R admin:admin /opt/cassandra/

cqlsh does not run on an upgraded appliance

Problem: When you upgrade your appliance to Appliance Platform 7.1.2 and API Gateway 7.5.3 the version of Python is not upgraded, and the cqlsh utility (which requires a newer version of Python) does not run.

Solution: Install Python version 2.7.11 on your appliance and set cqlsh to use this version of Python. Follow the steps in the knowledge base article The Python 2.7.11 RPM is attached to the article.

Note   This is only an issue when upgrading an existing appliance to API Gateway 7.5.3. The API Gateway Appliance 7.5.3 OVA includes version 2.7.11 of Python for cqlsh.

Related Links