Stage 5 - Upgrade Java (1.8.0 -> 11.0.23) & Cassandra (3.11.X -> 4.1.0)
Objective
Update Java from the current version 1.8.0_YYY → 11.0.23
Update Apache Cassandra from the current version 3.11.X to version 4.1.0.
Prerequisites
syndeia-cloud-3.6-SP2*_cassandra_zookeeper_kafka_setup.zippackage is available.The existing Cassandra service was installed using the yum package manager (this is typical if the previous version was installed using our standard installation process and scripts).
Cassandra and Janusgraph services are not running. This should have been done in this step and verified in the section following that step.
Python version 3.6 or above is installed.
Steps
cd to the
cassandra_zookeeper_kafka_setuppackage’sbindirectory:cd ~/syndeia-cloud-3.6-SP2*_cassandra_zookeeper_kafka_setup/binRun the Apache Cassandra pre-setup script:
./syndeia-cloud-3.6_cassandra_pre-setup.bashThis script will perform the following actions:
Download Cassandra 4.1 if not already download (e.g. for offline installation)
Update Java
Upgrade Cassandra 3.11 → 4.1
Update the configuration files
Start the Cassandra service
Casssandra 4.1 and upgrade from 3.11.x to 4.1, or just upgrade the already downloaded Cassandra 4.1. Depending on what version you are upgrading from, you should see output similar to the expandable section below:
Verification
Verify Cassandra is up and functioning by running:
sudo systemctl status cassandraYou should see “• active” in green and no errors.
[jdoe@new-server bin]$ sudo systemctl status cassandra ● cassandra.service - Cassandra NoSQL database Loaded: loaded (/etc/systemd/system/cassandra.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2024-09-16 11:43:28 EDT; 2min 26s ago Docs: https://cassandra.apache.org/ Main PID: 12417 (java) Tasks: 54 (limit: 102192) Memory: 4.3G CGroup: /system.slice/cassandra.service └─12417 /usr/bin/java -ea -da:net.openhft... -XX:+UseThreadPriorities -XX:+HeapDumpOnOutOfMemoryError -Xss256k -XX:+AlwaysPreTouch -XX:-UseB> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,439 SecondaryIndexManager.java:815 -> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,439 SecondaryIndexManager.java:815 -> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,439 SecondaryIndexManager.java:815 -> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,440 SecondaryIndexManager.java:815 -> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,446 StorageService.java:2971 - Node > Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,454 StorageService.java:2971 - Node > Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,467 AuthCache.java:340 - (Re)initial> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,470 AuthCache.java:340 - (Re)initial> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,474 AuthCache.java:340 - (Re)initial> Sep 16 11:43:38 new-server.domain.tld cassandra[12417]: INFO [main] 2024-09-16 11:43:38,486 CassandraDaemon.java:492 - Prewa>Run the following command to check the Cassandra version.
nodetool versionYou should see an output similar to the following.
ReleaseVersion: 4.1.0Verify Cassandra is up and accepting connections by running
nodetool status:
If you are on Linux:nodetool statusYou should get output similar to the following:
Datacenter: dc1 ======================= Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns (effective) Host ID Rack UN 192.168.1.3 644.57 KiB 256 100.0% 141c21db-4f79-476b-b818-ee6d2da16d7d rack1Confirm
sasi_indexes_enabled: truein/etc/cassandra/default.conf/cassandra.yaml. You can check by running:sudo grep sasi_indexes_enabled /etc/cassandra/default.conf/cassandra.yamlYou should see:
sasi_indexes_enabled: trueIf
sasi_indexes_enabledwas set tofalse, change ittrue, e.g.sasi_indexes_enabled: true. Save thecassandra.yaml file, and then restart the Cassandra service using the following command.:sudo systemctl restart cassandra