You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/17 13:58:05 UTC

[jira] [Commented] (FLINK-4087) JMXReporter can't handle port conflicts

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

ASF GitHub Bot commented on FLINK-4087:
---------------------------------------

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/2127

    [FLINK-4087] [metrics] Improved JMX port handling

    This PR modifies the JMX port handling.
    
    Instead of setting a specific configured port on JVM start-up we use an ephemeral port for the JVM's JMXServer.
    
    Inside the JVM we then spin-up another JMXServer which users can connect to. This JMXServer picks a port from a configured port range; iterating from start to end until it finds an open one.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink metrics_jmx_ports

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/2127.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2127
    
----
commit 18f754717333afc5969fcce0980126bdd5e1f5fc
Author: zentol <ch...@apache.org>
Date:   2016-06-17T13:47:53Z

    [FLINK-4087] [metrics] Improved JMX port handling

----


> JMXReporter can't handle port conflicts
> ---------------------------------------
>
>                 Key: FLINK-4087
>                 URL: https://issues.apache.org/jira/browse/FLINK-4087
>             Project: Flink
>          Issue Type: Improvement
>          Components: Metrics
>    Affects Versions: 1.1.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Blocker
>             Fix For: 1.1.0
>
>
> The JMXReporter is currently configured to use a single port that is set as a JVM argument.
> This approach has a few disadvantages:
> If multiple TaskManagers run on the same machine only 1 can expose metrics. This issue is compounded by the upcoming JobManager metrics, which would then prevent TM metrics from being exposed in local setups.
> Currently, we prevent other TM's from exposing metrics by checking the the start-daemon-sh whether a TM is already running, and if so clear the arguments. This isn't a particular safe way to do it, and this script is not used when deploying on yarn, leading to TM failures since the JVM can't allocate the JMX port.
> We should find a way to specifiy port-ranges for JMX and log the final port used.



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