Verifying the Installation of Apache Cassandra

10/12/2025

Verifying Apache Cassandra installation using terminal command cassandra -v

Go Back

Verifying the Installation of Apache Cassandra

Once Apache Cassandra is installed, it’s important to verify that the setup is correct and the service is running as expected. Below is a detailed, step-by-step guide to confirm a successful Cassandra installation on Linux or Windows systems.


 Verifying Apache Cassandra installation using terminal command cassandra -v

Step 1: Check Cassandra Version

After installation, verify that Cassandra is installed and accessible via the terminal.

Command:

cassandra -v

Expected Output:

4.1.3

(Version may vary depending on the installed release.)

This confirms that Cassandra is correctly added to your system’s PATH.


Step 2: Start Cassandra Service

Before verifying functionality, ensure Cassandra is running.

On Linux (systemd):

sudo systemctl start cassandra
sudo systemctl status cassandra

Expected output should include:

Active: active (running)

On Windows:

  1. Open Command Prompt as Administrator.

  2. Navigate to the Cassandra bin folder, e.g.:

    cd C:\Program Files\apache-cassandra\bin
    
  3. Start Cassandra:

    cassandra.bat
    

Step 3: Check Cassandra Logs

Cassandra generates logs that show startup details and potential errors.

Default log location:

/var/log/cassandra/system.log

Command:

tail -f /var/log/cassandra/system.log

Look for messages like:

Starting listening for CQL clients on /127.0.0.1:9042

This indicates that Cassandra is running and listening for client connections.


Step 4: Connect to CQL Shell (cqlsh)

Cassandra Query Language Shell (cqlsh) is a command-line interface for interacting with Cassandra.

Command:

cqlsh

Expected Output:

Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 6.1.0 | Cassandra 4.1.3 | CQL spec 3.4.5 | Native protocol v5]
Use HELP for help.

If you can connect successfully, your node is functioning properly.


Step 5: Check Cluster Status

The nodetool utility shows the health and status of your Cassandra nodes.

Command:

nodetool status

Example Output:

Datacenter: DC1
====================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address         Load       Tokens  Owns (effective)  Host ID                               Rack
UN  127.0.0.1       120 KB     256     100.0%            e3b1b64a-24a1-42a4-8307-2d5324c1cb58  rack1

Interpretation:

  • U → Node is Up

  • N → Node is in Normal state

If you see UN, it means Cassandra is working perfectly.


Step 6: Run Test Queries in cqlsh

Once connected to cqlsh, create a test keyspace and table to ensure everything is operational.

CREATE KEYSPACE demo WITH REPLICATION = {'class': 'SimpleStrategy', 'replication_factor': 1};
USE demo;
CREATE TABLE users (id UUID PRIMARY KEY, name TEXT);
INSERT INTO users (id, name) VALUES (uuid(), 'Alice');
SELECT * FROM users;

If you see the inserted data in the output, Cassandra is functioning correctly.


🧠 Step 7: Verify Java and Environment

Cassandra requires Java to run, so confirm the Java environment is correctly configured.

Command:

java -version

Expected Output:

openjdk version "11.x"  or  "1.8.x"

📋 Summary Table

StepDescriptionCommand
1Check Cassandra versioncassandra -v
2Start Cassandra servicesudo systemctl start cassandra
3Check logs for errorstail -f /var/log/cassandra/system.log
4Connect to CQL shellcqlsh
5Check cluster statusnodetool status
6Run test queriesCREATE KEYSPACE demo;
7Verify Java setupjava -version

Conclusion

By following these steps, you can confirm that Apache Cassandra has been installed and configured successfully. Checking the version, logs, and cluster status ensures your database is stable and ready for production workloads. Once verified, you can proceed with configuring a multi-node Cassandra cluster for distributed data stor