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

  1. Upgrading ZooKeeper from 3.4.11 to 3.6.2
    1. Connect to the target server(s) using your preferred ssh tool (e.g., PuTTY) and log in.
    2. Before you begin, stop the Solr and ZooKeeper services on all cluster nodes
      systemctl stop solr && systemctl stop zookeeper
    3. Proceed with the upgrade of your ZooKeeper installation
      1. Change to the parent directory of your ZooKeeper installation
        cd /opt
      2. 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
      3. 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
      4. 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
      5. 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
      6. 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
      7. Append the following lines to your ZooKeeper configuration file zoo.cfg
        standaloneEnabled=false
        reconfigEnabled=false
        4lw.commands.whitelist=mntr,conf,ruok
      8. Comment out the clientPort directive
        # clientPort=2181
      9. 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
      10. Start the ZooKeeper service again
        systemctl start zookeeper
    4. Repeat previous step including all Substeps on all cluster nodes
    5. Continue with Setting the urlScheme to https (without starting Solr).
    You have successfully upgraded ZooKeeper to version 3.6.2.
  2. Upgrading Solr from 8.3.1 to 8.11.1
    1. Change to the parent directory of your Solr installation
      cd /opt
    2. 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
    3. 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/*
    4. Remove the symlink to the old Solr installation.
      rm solr
    5. Switch to the bin directory of the extracted Solr archive.
      cd ./solr-8.11.1/bin/
    6. Run the Solr installation script with the upgrade flag -f
      ./install_solr_service.sh ../../solr-8.11.1.tgz -f
    7. Repeat all steps on all cluster nodes
    You have successfully upgraded Solr to version 8.11.1
  3. 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
    1. 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
    2. Configure Basic Authentication in Solr, following Enabling Basic Authentication in Solr
    3. 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.
    4. Restart the Solr service
      systemctl restart solr
    5. 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.