Enabling debugging traces for Apache Solr services


This SAS KB article provides steps to enable debugging traces for Apache Solr services.

Enable Debugging Tracing

For Linux or UNIX Operating Environments:

  1. Make a backup of the log4j.properties (for an earlier release of Solr) or the log4j2.xml file (for Solr 8.5.2 and later) that resides in the Solr-home-directory/server/resources/ directory.
  2. Open the log4j.properties file and change the parameters that are shown below to have a value of DEBUG:
log4j.rootLogger=DEBUG, file, CONSOLE

log4j.logger.org.apache.zookeeper=DEBUG
log4j.logger.org.apache.hadoop=DEBUG
log4j.logger.org.apache.solr.highlight=DEBUG

For Solr 8.5.2 releases or later, open the log4j2.xml file and change the parameters that are shown below to have a value of DEBUG:

<AsyncLogger name="org.apache.hadoop" level="DEBUG"/>
<AsyncLogger name="org.apache.solr.update.LoggingInfoStream" level="on"/>
<AsyncLogger name="org.apache.zookeeper" level="DEBUG"/>
<AsyncLogger name="org.apache.solr.highlight" level="DEBUG"/>
  1. To generate additional traces, stop and restart Apache Solr services by submitting the following commands:
Solr-home-directory/bin/./solr stop -p 8983 
Solr-home-directory/bin/./solr start - p 8983

For Microsoft Windows Operating Environments:

  1. Make a backup of the log4j.properties (for an earlier release of Solr) or the log4j2.xml file (for Solr 8.5.2 and later) file that resides in the Solr-home-directory\server\resources\ directory.
  2. Open the log4j.properties file and change the parameters that are shown below:
log4j.rootLogger=DEBUG, file, CONSOLE
log4j.logger.org.apache.zookeeper=DEBUG
log4j.logger.org.apache.hadoop=DEBUG
log4j.logger.org.apache.solr.highlight=DEBUG

For Solr 8.5.2 releases or later, open the log4j2.xml file and change the parameters that are shown below to have a value of DEBUG:

<AsyncLogger name="org.apache.hadoop" level="DEBUG"/>
<AsyncLogger name="org.apache.solr.update.LoggingInfoStream" level="on"/>
<AsyncLogger name="org.apache.zookeeper" level="DEBUG"/>
<AsyncLogger name="org.apache.solr.highlight" level="DEBUG"/>
  1. To generate additional traces, stop and restart Apache Solr services by submitting the following commands: 
Solr-home-directory\bin\solr stop -p 8983 
Solr-home-directory\bin\solr start - p 8983

Collect Log and Configuration Files 

Collect the following log and configuration files, for your particular environment, to send to SAS Technical Support for review.

For Linux or UNIX Environments:

For Windows Environments: