Upgrading Apache Cassandra cluster

Image for post
Image for post

At thethings.io we use Cassandra as our timeseries database for thing data. Weeks ago we needed to upgrade our cassandra version to a major release version.

This post aims to group all steps that we use for upgrade our Cassandra cluster to a newer version. There are a lot of documentation and sometimes it is a little bit annoying to look at different pages.

This section describes how to upgrade Apache Cassandra with zero downtime if your cluster has a replication factor of at least 3.


  • Be careful when you run these steps on production environments.
  • For command simplicity I don’t include the user and password. Ex: nodetool drain -u username -pw password


  • Familiarize yourself with the changes and features in this new release.
  • Remove all dead nodes.
  • Do not run nodetool repair or other tasks.

Please check this link for more information.

Steps for upgrade cassandra version

nodetool drain -h hostname

2. Stop cassandra services.

service cassandra stop
service datastax-agent stop

3. Back up your cassandra configuration files from the old installation to safe place.

4. Update java version.

apt-get update
apt-get install oracle-java8-set-default
java -version

5. Install the new version of Apache Cassandra.

apt-get update
apt-get install cassandra=3.0.9

If you are running Cassandra from a source you should download the latest tar.gz instead of using the package manager.

6. Configure the new product. Review, compare, merge and/or update any modifications you have previously made into the new configuration files for the new version (cassandra.yml, cassandra-env.sh, etc.). Take care with the configuration options and check version restrictions.

7. Start the cassandra services.

service cassandra start
service datastax-agent start

Check the logs for warnings, errors, and exceptions.

tail -f /ttio/var/logs/cassandra/system.log # or path where you set your logs.

8. Run nodetool upgradesstables

nodetool upgradesstables

9. Check the logs for warnings, errors, and exceptions.

tail -f /ttio/var/logs/cassandra/system.log # or path where you set your logs.

10. Check the status of the cluster

nodetool -h hostname status

11. Repeat theses upgrade steps on each node in the cluster.


Originally published at Adrià Galín.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store