janhoy opened a new pull request, #3944:
URL: https://github.com/apache/solr/pull/3944
Spent 1/2 hour with Claude on this, and it all makes sense.
## Root Cause
The SOLR-15442 commit (which synchronized port and host variable naming)
made an incomplete update:
1. What changed in SOLR-15442:
- Renamed jetty.port → solr.port.listen
- Renamed host → solr.host.advertise
- Updated solr.xml to use ${solr.host.advertise:} instead of ${host:}
2. The bug:
- TestSolrCLIRunExample.java was updated to use solr.port.listen ✅
- But it still used the deprecated `host` property instead of
`solr.host.advertise` ❌
- TestHarness.java also still used the old `host` property ❌
3. Why it failed:
- The test sets System.setProperty("host", "localhost") after EnvUtils
initialization
- The deprecated property mapping only runs during static initialization
- So `solr.host.advertise` remained unset
- Solr nodes couldn't register properly in ZooKeeper
- Result: "No live SolrServers available to handle this request"
## Files Fixed
1. TestSolrCLIRunExample.java (lines 127, 215, and JavaDoc):
- Changed System.setProperty("host", "localhost")
- To System.setProperty("solr.host.advertise", "localhost")
2. TestHarness.java (line 191):
- Changed System.getProperty("host")
- To System.getProperty("solr.host.advertise")
https://issues.apache.org/jira/browse/SOLR-18026
Other tests could also be at risk if they MODIFY the deprecated variant, and
it is read by Solr with the new name.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]