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

OTEL configurator NPE when SOLR_HOST not set

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 9.4
    • tracing
    • None

    Description

      If you start Solr 9.3 with OTEL tracing enabled, but do not set SOLR_HOST, solr will not come up due to it trying to read sysprop "host" which is null and Map.of() requires non-null key and value.

      Simple workaround is to set SOLR_HOST but for dev environment it would be nice to fix the bug by checking before setting the "host.name" trace-property.

      at java.base/java.util.Objects.requireNonNull(Unknown Source)
      java.lang.NullPointerException: null
      at java.util.Objects.requireNonNull(Unknown Source) ~[?:?]
      at java.util.ImmutableCollections$Map1.<init>(Unknown Source) ~[?:?]
      at java.util.Map.of(Unknown Source) ~[?:?]
      at org.apache.solr.opentelemetry.OtelTracerConfigurator.getTracer(OtelTracerConfigurator.java:50) ~[?:?] 

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            janhoy Jan Høydahl
            janhoy Jan Høydahl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h

                Slack

                  Issue deployment