Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-6677

Random ZooKeeper port in test can overrun max port

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.95.2
    • 0.95.0
    • test
    • None
    • Reviewed

    Description

       
           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;
            }
      

      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.

      Attachments

        1. HBASE-6677.patch
          0.7 kB
          Liang Xie

        Activity

          People

            xieliang007 Liang Xie
            gchanan Gregory Chanan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: