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

Add built-in option to advertise Solr with a different port than Jetty listens on.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 8.8
    • None
    • None

    Description

      Currently the default settings in solr.xml allow the specification of one port, jetty.port which the bin/solr script provides from the SOLR_PORT environment variable. This port is used twice. Jetty uses it to listen for requests, and the clusterState uses the port to advertise the address of the Solr Node.

      In cloud environments, it's sometimes crucial to be able to listen on one port and advertise yourself as listening on another. This is because there is a proxy that listens on the advertised port, and forwards the request to the server which is listening to the jetty port.

      Solr already supports having a separate Jetty port and Live Nodes port (examples provided in the dev-list discussion linked below). I suggest that we add this to the default solr config so that users can use the default solr.xml in cloud configurations, and the solr/bin script will enable easy use of this feature.

      There has been discussion on this exact problem on the dev list already.

      I propose the new system property to be used for hostPort in the solr.xml. I am open to changing the name, but to me it is more descriptive than hostPort.
      -Dsolr.port.advertise and SOLR_PORT_ADVERTISE (env var checked in bin/solr).

      The xml field <hostPort> would not be changed however, just the system property that is used to fill the value in the default solr.xml.

      Attachments

        Issue Links

          Activity

            People

              houston Houston Putman
              houston Houston Putman
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 40m
                  40m