Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-4331

Make port configuration and allocation consistent across services

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None

      Description

      There was some discussion in ACCUMULO-4328 about ports, so I decided to track down how the client ports are configured and allocated. Issues raised in the discussion were:

      1. The port search feature was not well understood
      2. Ephemeral port allocation makes it hard to lock servers down (e.g. iptables)

      Looking through the code I found the following properties allocate a port number based on conf.getPort(). This returns the port number based on the property and supports either a single value or zero. Then, in the server component (monitor, tracer, gc, etc) this value is used when creating a ServerSocket. If the port is already in use, the process will fail.

      monitor.port.log4j
      trace.port.client
      gc.port.client
      monitor.port.client
      

      The following properties use TServerUtils.startServer which uses the value in the property to start the TServer. If the value is zero, then it picks a random port between 1024 and 65535. If tserver.port.search is enabled, then it will try a thousand times to bind to a random port.

      tserver.port.client
      master.port.client
      master.replication.coordinator.port
      replication.receipt.service.port
      

      I'm proposing that we deprecate the tserver.port.search property and the value zero in the property value for the properties above. Instead, I think we should allow the user to specify a single value or a range (M-N).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dlmarion Dave Marion
                Reporter:
                dlmarion Dave Marion
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 5h
                  5h