thenatog commented on a change in pull request #3932: NIFI-6336 Added code to 
catch port value when it is 0.
URL: https://github.com/apache/nifi/pull/3932#discussion_r357767089
 
 

 ##########
 File path: 
nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
 ##########
 @@ -743,6 +743,9 @@ public InetSocketAddress getClusterNodeProtocolAddress() {
                 socketAddress = "localhost";
             }
             int socketPort = getClusterNodeProtocolPort();
+            if (socketPort == 0) {
+                throw new RuntimeException("Load balance port cannot be 0. 
Port must be inclusively in the range [1, 65535].");
 
 Review comment:
   Using port 0 throws an exception in the NodeIdentifier.java:204. Should we 
allow a port of 0 (a Java-chosen random port) for all port configurations in 
NiFi or require administrators to configure explicit ports?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to