Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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
- relates to
-
SOLR-2722 In solr.xml, default hostPort to ${jetty.port}
- Closed
- links to