janhoy commented on code in PR #2885: URL: https://github.com/apache/solr/pull/2885#discussion_r1860578922
########## solr/core/src/java/org/apache/solr/cli/ExportTool.java: ########## @@ -660,8 +660,8 @@ class CoreHandler { } boolean exportDocsFromCore() throws IOException, SolrServerException { - - try (SolrClient client = CLIUtils.getSolrClient(baseurl, credentials)) { + // reference the replica's node URL, not the baseUrl in scope, which could be anywhere + try (SolrClient client = CLIUtils.getSolrClient(replica.getBaseUrl(), credentials)) { Review Comment: Since this is a CLI tool, and the CLI tool is potentially being used from a computer outside the cluster itself, I wonder if a side-effect of this might be that it won't work through reverse proxy / ingress with a different external DNS name than what Solr has on the inside. If I interpret this code correctly, `replica.getBaseUrl()` is data fetched from ZK clusterstate, while `baseUrl` was the user-supplied `--solr-url`. Thus it could be that export tool would currently work through a proxy / ingress due to the auto proxying, but may not work with this change. A related and similar issue is that the Admin UI does not work well behind a reverse proxy, if you try to click on links for other Cores it will all break. If we truly want to support clients through reverse proxies, I believe the correct fix is for the Solr server to support [Forwarded HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded) (and its `X-Forwarded-*` counterparts) and rewrite URLs served in REST responses to adhere to the external address space, not the internal. -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org