This article provides instructions for manually upgrading the Log4j version for Solr and the platform.
Manually Upgrade Log4j JAR Files in Platform
To manually upgrade the Log4j JAR files from one version to another in platform, follow the instructions below.
- Download the Log4j package containing jar files from the following link https://archive.apache.org/dist/logging/log4j/ and place it in
$APIN_HOME=/opt/meshiq -
Unzip the downloaded package using the following command
unzip apache-log4j-2.x.x-bin.zip
- apache-log4j-2.x.x folder is obtained containing all the required jars that have to be replaced.
-
Go to
$APIN_HOME/sbinand stop Web, CEP, and Domain services using the following command,./stop.sh web ./stop.sh cep ./stop.sh domain
-
Navigate to
$APIN_HOME/platform/lib/and replace the following JAR files,$APIN_HOME/platform/lib/log4j-core-xxx.jar $APIN_HOME/platform/lib/log4j-slf4j2-impl-xxx.jar $APIN_HOME/platform/lib/log4j-api-xxx.jar
-
Also, the
commons-text-xxx.jarshould be replaced in the following location$APIN_HOME/platform/lib/commons-text-xxx.jar
This jar file can be downloaded from the following link https://archive.apache.org/dist/commons/text/binaries/
-
Restart the Domain, CEP, and Web services in the
$APIN_HOME/sbinusing ./start.sh./start.sh domain ./start.sh cep ./start.sh web
Manually Upgrade Log4j JAR Files in Solr
To manually upgrade the Log4j JAR files from one version to another in Solr, follow the instructions below.
- Download the Log4j package containing JAR files from the following link https://archive.apache.org/dist/logging/log4j/ and place it in
$APIN_HOME -
Unzip the downloaded package using the following command
unzip apache-log4j-2.x.x-bin.zip
- The apache-log4j-2.x.x folder is obtained containing all the required jars that have to be replaced.
-
Go to
$APIN_HOME/sbinand stop Web, CEP, Domain, and Solr services using the following command,./stop.sh web ./stop.sh cep ./stop.sh domain ./stop.sh solr
-
Navigate to
$APIN_HOME/solr/solr-8.11.1/server/lib/extand replace the following JAR files,$APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-core-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-web-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-slf4j-impl-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-layout-template-json-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-api-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-1.2-api-xxx.jar $APIN_HOME/solr/solr-8.11.1/contrib/prometheus-exporter/lib/log4j-core-xxx.jar $APIN_HOME/solr/solr-8.11.1/contrib/prometheus-exporter/lib/log4j-slf4j-xxx.jar $APIN_HOME/solr/solr-8.11.1/contrib/prometheus-exporter/lib/log4j-api-xxx.jar
-
If updating 11.2 (deployment pack) and later versions only the following jars shall be replaced.
$APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-core-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-web-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-slf4j-impl-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-layout-template-json-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-api-xxx.jar $APIN_HOME/solr/solr-8.11.1/server/lib/ext/log4j-1.2-api-xxx.jar
-
Also, the
commons-text-xxx.jarshould be replaced in the following location$APIN_HOME/solr/solr-8.11.1/server/solr-webapp/webapp/WEB-INF/lib/commons-text-xxx.jar
This jar file can be downloaded from the following link https://archive.apache.org/dist/commons/text/binaries/
-
Restart the Web, CEP, Domain, and Solr services in the
$APIN_HOME/sbinusing ./start.sh./start.sh solr ./start.sh domain ./start.sh cep ./start.sh web