janhoy commented on code in PR #5347:
URL: https://github.com/apache/solr/pull/5347#discussion_r4576053674


##########
solr/core/src/java/org/apache/solr/cli/RunExampleTool.java:
##########
@@ -557,8 +558,8 @@ public void runImpl(CommandLine cli) throws Exception {
   }
 
   /**
-   * Rejects ports outside the range bin/solr's embedded ZooKeeper (port + 
1000) can support, for
-   * every example type.
+   * Rejects ports outside the range bin/solr's embedded ZooKeeper (port + 
1000, unless {@link
+   * SolrZkServer#EMBEDDED_ZK_PORT_PROPERTY} is set) can support, for every 
example type.

Review Comment:
   🤖 Fixed differently: one ceiling of 64000 everywhere instead of a 
conditional one. 64535 left no room for the extra ports a multi-node example 
uses, so validatePort and both scripts now cap at 64000 and the errors say why.



##########
solr/core/src/java/org/apache/solr/cli/RunExampleTool.java:
##########
@@ -668,9 +669,11 @@ void runSecureExample(CloudExampleParams params, boolean 
userManaged) throws Exc
             + serverDir.getParent().toAbsolutePath().normalize());
     Path tls = home.resolve("tls");
     Path include = tls.resolve("solr.in.sh");
-    String zkHost = "localhost:" + (port + 1000);
+    int zkPort = SolrZkServer.resolveClientPort(port);
+    String zkHost = "localhost:" + zkPort;

Review Comment:
   🤖 No change: no shipped zoo.cfg sets clientPort — server/solr/zoo.cfg, the 
file the secure example copies, has it commented out. The example resolves the 
port once, pins it in the nodes environment and uses the same number for node 2 
-z, so parent and nodes agree; a clientPort a user adds is still honoured by 
the node itself. Validating in the parent is deliberate fail-fast, before any 
node is started.



-- 
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]

Reply via email to