Skip to main content
Skip table of contents

Cassandra upgrade to 4.0.9

This article will provide a step by step procedure to update Cassandra to version 4.0.9.

1) Run the update script one persistence node at a time

On all persistence nodes the following commands must be used by the root user in order to update Cassandra:

# check if jemalloc is installed on persistence nodes; it is necessary to improve cassandra performance:
rpm -qa | grep jemalloc
##if not, plesae install it:
yum install jemalloc

# Get the latest build number of the Cassandra RPM (the same one as the update procedure)

BUILD_DATE=`rpm -q veridiumid_update_procedure | cut -d"-" -f3 | cut -d'.' -f1 | tr -d [:space:]`

# Run the update Cassandra script

cd /etc/veridiumid/update-procedure/current/resources/scripts/331/

# See on what port is Cassandra using for Storage port
# Get pid of Cassandra service

pid=`ps -ef | grep ver_cas | grep -v grep | awk '{print $2}' | tr -d ['space']`

# Check if port 7000 is being used

netstat -tlnp | grep ${pid} | grep 7000

# If the port is used, change the value of the storage port inside of the script by using the following command

sed -i "s|7001|7000|g"

# In case of using YUM repository


# in case of using local RPMs


# Where PATH_TO_RPM is the full path to the directory containing the latest VeridiumID update packages, for example: /home/veridiumid/update-331/packages

3) Post update steps

After all persistence nodes have been updated run the following commands as root user in order to upgrade Cassandra’s SSTables:

# Rewrite SSTables that are not on the current version and upgrade them to the 4.0.9 version

nohup /opt/veridiumid/cassandra/bin/nodetool upgradesstables &

# To check status of task run the following command

/opt/veridiumid/cassandra/bin/nodetool compactionstats

# Repair tables on your new installation
## run this after upgradesstables has finished on one node in each datacenter, not in parallel.
nohup /opt/veridiumid/cassandra/bin/nodetool repair -pr &

4) Uncomment crontab

# Remove the comment character from the Cassandra backup and maintenance operations on all Persistence servers

crontab -e
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.