[ https://issues.apache.org/jira/browse/HBASE-6677?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443428#comment-13443428 ]
Gregory Chanan commented on HBASE-6677: --------------------------------------- Should mention, the above code comes from MiniZooKeeperCluster.java > Random ZooKeeper port in test can overrun max port > -------------------------------------------------- > > Key: HBASE-6677 > URL: https://issues.apache.org/jira/browse/HBASE-6677 > Project: HBase > Issue Type: Bug > Components: test > Affects Versions: 0.96.0 > Reporter: Gregory Chanan > Priority: Trivial > Labels: noob > > {code} > while (true) { > try { > standaloneServerFactory = new NIOServerCnxnFactory(); > standaloneServerFactory.configure( > new InetSocketAddress(tentativePort), > configuration.getInt(HConstants.ZOOKEEPER_MAX_CLIENT_CNXNS, > 1000)); > } catch (BindException e) { > LOG.debug("Failed binding ZK Server to client port: " + > tentativePort); > // This port is already in use, try to use another. > tentativePort++; > continue; > } > break; > } > {code} > In the case of failure and all the above ports have already been binded, you > can extend past the max port. Need to check against a max value. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira