Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14484

NPE in ConcurrentUpdateHttp2SolrClient MDC logging

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 8.4.1
    • 8.6
    • None
    • None

    Description

      client.getBaseURL() can be null in ConcurrentUpdateHttp2SolrClient which can cause problems in MDC logging.

      We had the following error in the stacktrace. We were using Solr 8.4.1 from lily hbase-indexer which still uses log4j 1.2:

      Error from server at http://127.0.0.1:45895/solr/collection1: java.lang.NullPointerException
       at java.util.Hashtable.put(Hashtable.java:459)
       at org.apache.log4j.MDC.put0(MDC.java:150)
       at org.apache.log4j.MDC.put(MDC.java:85)
       at org.slf4j.impl.Log4jMDCAdapter.put(Log4jMDCAdapter.java:67)
       at org.slf4j.MDC.put(MDC.java:147)
       at org.apache.solr.client.solrj.impl.ConcurrentUpdateHttp2SolrClient.addRunner(ConcurrentUpdateHttp2SolrClient.java:346)
       at org.apache.solr.client.solrj.impl.ConcurrentUpdateHttp2SolrClient.waitForEmptyQueue(ConcurrentUpdateHttp2SolrClient.java:565)
       

      Attachments

        1. SOLR-14484-02.patch
          0.8 kB
          Andras Salamon
        2. SOLR-14484-01.patch
          0.9 kB
          Andras Salamon

        Activity

          People

            dsmiley David Smiley
            asalamon74 Andras Salamon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: