walterddr commented on a change in pull request #13163:
URL: https://github.com/apache/flink/pull/13163#discussion_r474217701



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/management/JMXService.java
##########
@@ -85,6 +86,9 @@ private static JMXServer 
startJMXServerWithPortRanges(Iterator<Integer> ports) {
                while (ports.hasNext() && successfullyStartedServer == null) {
                        JMXServer server = new JMXServer();
                        int port = ports.next();
+                       if (port == 0) { // try poke with a random port when 
port is set to zero

Review comment:
       yeah. I think it is clear the solution is to map `port 0` to `port 10000 
- 65000`. 
   there are 2 potential todos here if we going down this path:
   1. have a more randomized iterator just like you mentioned above, it could 
be put under `Netutils` that might be reused later.
   2. with the randomized port iterator, do you think there's still need a hard 
timeout? 
   
   
   




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to