Upgrading to Solr 8.11.1 and ZooKeeper 3.6.2
Condition
The actual Solr version is behind 8.11.1 and the ZooKeeper version is behind 3.6.2.
Note: We strongly recommend backing up your existing Solr and
ZooKeeper configuration and data
Note: It is required that you configure Basic Authentication prior to or after upgrading to Solr 8.11.1
Note: If you uploaded your initial Solr configset without Basic Authentication enabled, you should delete it and upload it again once you have enabled Basic Authentication.
All index data will be retained.
Cause
New versions of Solr and ZooKeeper have been released and made compatible with eperi sEcure Platform.
Remedy
Procedure
-
Upgrading ZooKeeper from 3.4.11 to 3.6.2
- Connect to the target server(s) using your preferred ssh tool (e.g., PuTTY) and log in.
-
Before you begin, stop the Solr and ZooKeeper services on all cluster nodes
systemctl stop solr && systemctl stop zookeeper -
Proceed with the upgrade of your ZooKeeper installation
- Change to the parent directory of your ZooKeeper installation
cd /opt - Backup the modified configuration files of your
ZooKeeper installation
mkdir solr_upgrade && cp ./zookeeper/conf/zoo.cfg \ ./zookeeper/conf/java.env /var/lib/zookeeper/data/myid ./solr_upgrade - Download and extract the ZooKeeper archive and change the ownership of the extracted folder to the zookeeper user.
wget -O apache-zookeeper-3.6.2-bin.tar.gz \ https://archive.apache.org/dist/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz tar xzf apache-zookeeper-3.6.2-bin.tar.gz chown -R zookeeper:zookeeper apache-zookeeper-3.6.2-bin - Remove the symlink to the old ZooKeeper installation and create a new symlink that points to the new directory
rm zookeeper ln -s apache-zookeeper-3.6.2-bin zookeeper - Change to the versioned directory within your data directory and download the following snapshot file provided by Apache
cd /var/lib/zookeeper/data/version-2/ wget https://issues.apache.org/jira/secure/attachment/12928686/snapshot.0 - Copy the previously saved configuration files back to your new ZooKeeper installation directory and set the owner to the zookeeper user
cd /opt cp ./solr_upgrade/*.* ./zookeeper/conf/ cp ./solr_upgrade/myid /var/lib/zookeeper/data/ chown zookeeper:zookeeper ./zookeeper/conf/* /var/lib/zookeeper/data/myid - Append the following lines to your ZooKeeper configuration file zoo.cfg
standaloneEnabled=false reconfigEnabled=false 4lw.commands.whitelist=mntr,conf,ruok - Comment out the clientPort directive
# clientPort=2181 - Adjust the configuration format of the server statements like this
server.1 = <first server IP>:2888:3888:participant;0.0.0.0:2181 server.2 = <second server IP>:2888:3888:participant;0.0.0.0:2181 server.2 = <third server IP>:2888:3888:participant;0.0.0.0:2181 - Start the ZooKeeper service again
systemctl start zookeeper
- Change to the parent directory of your ZooKeeper installation
- Repeat previous step including all Substeps on all cluster nodes
- Continue with Setting the urlScheme to https (without starting Solr).
You have successfully upgraded ZooKeeper to version 3.6.2. -
Upgrading Solr from 8.3.1 to 8.11.1
-
Change to the parent directory of your Solr installation
cd /opt -
Download and extract the Solr archive and change the ownership
of the extracted folder to the solr user
wget -O solr-8.11.1.tgz https://archive.apache.org/dist/lucene/solr/8.11.1/solr-8.11.1.tgz tar xzf solr-8.11.1.tgz -
Optional: Only if you have placed the Solr SSL certificates inside your Solr installation directory.
Copy your Solr SSL certificates to the new Solr installation directory
cp -R ./solr/ssl/ ./solr-8.11.1/ chown -R root:solr ./solr-8.11.1/ssl/ chmod 640 ./solr-8.11.1/ssl/* -
Remove the symlink to the old Solr installation.
rm solr -
Switch to the bin directory of the extracted Solr archive.
cd ./solr-8.11.1/bin/ -
Run the Solr installation script with the upgrade flag -f
./install_solr_service.sh ../../solr-8.11.1.tgz -f - Repeat all steps on all cluster nodes
You have successfully upgraded Solr to version 8.11.1 -
Change to the parent directory of your Solr installation
-
Deleting and reuploading the Solr configset
Note: This step is only necessary if the Solr configset was initially uploaded without Basic Authentication enabled in Solr.Note: First step must only be completed on one node in the Solr Cluster
-
Delete the Solr configset
- For Microsoft 365:
/opt/solr/server/scripts/cloud-scripts/zkcli.sh -cmd clear -z "localhost:2181" \ /configs/eperi_o365 - For Salesforce:
/opt/solr/server/scripts/cloud-scripts/zkcli.sh -cmd clear -z "localhost:2181" \ /configs/eperi_sfdc
- For Microsoft 365:
- Configure Basic Authentication in Solr, following Enabling Basic Authentication in Solr
-
Reupload the Solr configset, following Uploading the Configset & Creating the Solr Collections
Note: You should only upload the configset. DO NOT recreate the collections, otherwise all indexed data will be lost.
-
Restart the Solr service
systemctl restart solr - If Basic Authentication has just been configured, reconfigure the Solr services in eperi sEcure Platform, following Configuring the Solr services in eperi sEcure Platform
You have successfully reuploaded the Solr configset with Basic Authentication. -
Delete the Solr configset
