IMPORTANT ANNOUNCEMENT: On May 6, 2024, Carbon Black User eXchange (UeX) and Case Management will move to a new platform!
The Community will be in read-only mode starting April 19th, 7:00 AM PDT. Check out the blog post!
You will still be able to use the case portal to create and interact with your support cases until the transition, view more information here!

EDR: How to Enable Solr Search Debug Logging

EDR: How to Enable Solr Search Debug Logging

Environment

  • EDR Server: 7.x and Higher

Objective

Enable Solr debug logging to troubleshoot long running queries

Resolution

 
  1. Edit /etc/cb/solr/log4j2.xml
  2. Delete the comment lines shown in red, both lines above (<--) and below (-->) the debug logging line are removed
    <--
    <AsyncLogger name="com.carbonblack.cbfs.solr.handler.CbSearchRequestHandlers" level="DEBUG" /> 
    -->
  3. Reproduce the search issue. If this is a watchlist timeout, the job will run every 10 minutes
  4. After reproduction, use the following command to back up the debug and restore normal logging
    mv /etc/cb/solr/log4j2.xml /etc/cb/solr/log4j2.xml.debug && cp /etc/cb/solr/log4j2.xml.template /etc/cb/solr/log4j2.xml

Additional Notes

  • No service restart is required for Solr to pick up the new logging settings
  • Since this setting is trying to find long running search queries, logs for troubleshooting should be collected no sooner than 30 minutes after reproducing the issue. 
  • Debug logging will list all queries active and completed every 10 seconds
  • Restarting the services will also cause EDR to replace the existing log4j2.xml with the log4j2.xml.template
  • For Solr debugging to survive a restart of the services the log4j2.xml.template can be modified

Labels (1)
Tags (2)
Was this article helpful? Yes No
No ratings
Article Information
Author:
Creation Date:
‎09-09-2020
Views:
551
Contributors