To upgrade Log4j version jar files manually from one version to another version follow the below instructions.
- Download the Log4j package containing jar files from following link https://archive.apache.org/dist/logging/log4j/ and place it
$APIN_HOME
- Unzip the downloaded package using following command
unzip apache-log4j-2.x.x-bin.zip
- apache-log4j-2.x.x folder is obtained containing all the required jars that has to be replaced.
- Go to
$APIN_HOME/sbin
and 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/ext
and replace the following jar,
$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.jar
should 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 Domain, CEP, web servers, and Solr services in the
$APIN_HOME/sbin
using ./start.sh
./start.sh solr
./start.sh domain
./start.sh cep
./start.sh web