accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Marion (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (ACCUMULO-4331) Make port configuration and allocation consistent across services
Date Tue, 07 Jun 2016 21:24:21 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-4331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15319456#comment-15319456
] 

Dave Marion edited comment on ACCUMULO-4331 at 6/7/16 9:24 PM:
---------------------------------------------------------------

So, based on the comments here, it seems the consensus is to

1. Keep zero as a valid port option, which means any ephemeral port
2. Keep tserver.port.search, but maybe change it such that it performs a 1-up attempt instead
of random
3. Allow the user to specify a range of ports to be used (M-N). [new feature]
4. If user specifies a range of ports, and tserver.port.search is disabled, any port in that
range is still valid.


was (Author: dlmarion):
So, based on the comments here, it seems the consensus is to

1. Keep zero as a valid port option, which means any ephemeral port
2. Keep tserver.port.search, but maybe change it such that it performs a 1-up attempt instead
of random
3. Allow the user to specify a range of ports to be used (M-N).

I'll add a 4th here assuming that I am going to merge in ACCUMULO-4328:

4. IF the system property "instance" is set to N, then the Nth port in the tserver.client.port
range will be used. This is an attempt to provide some port stability to multiple tservers
on the same host.

> Make port configuration and allocation consistent across services
> -----------------------------------------------------------------
>
>                 Key: ACCUMULO-4331
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4331
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.8.0
>            Reporter: Dave Marion
>             Fix For: 1.8.0
>
>
> 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.
> {noformat}
> monitor.port.log4j
> trace.port.client
> gc.port.client
> monitor.port.client
> {noformat}
> 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.
> {noformat}
> tserver.port.client
> master.port.client
> master.replication.coordinator.port
> replication.receipt.service.port
> {noformat}
> 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). 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message