Configure your Solr cluster properties in ZooKeeper, so that Solr nodes know to
communicate via SSL.
Before you begin
You have already installed and configured all ZooKeeper and
Solr cluster nodes.
Procedure
-
Stop the Solr service on all nodes:
For Ubuntu:systemctl stop solr
For RHEL:service solr stop
-
Connect to one of the Solr nodes and change to the root user, if this is not
already the case:
-
Add the missing executable flag to the zkcli script:
chmod +x /opt/solr/server/scripts/cloud-scripts/zkcli.sh
-
Become Solr user and set the HTTPS url scheme:
sudo su - solr
/opt/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost \
server1:2181,server2:2181,server3:2181 \
-cmd clusterprop -name urlScheme -val https
Note: If there are existing Solr collections prior to enabling SSL, use the
following command to update the cluster properties to use HTTPS (update the
hostname and port as appropriate for your system):
http://<hostname>:<port>/solr/admin/collections?action=CLUSTERPROP&name=urlScheme&val=https
The following message should be
displayed:
INFO - xxxx-xx-xx xx:xx:xx.xxx; org.apache.solr.common.cloud.ConnectionManager; zkClient has connected
-
Press Ctrl+D or enter exit to go back to the root
user.
-
Start the Solr service on all nodes:
For Ubuntu:systemctl start solr
For RHEL:service solr start
Results
You have successfully set up the urlScheme to https on all
Solr nodes.