[
https://issues.apache.org/jira/browse/FLINK-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15360682#comment-15360682
]
ASF GitHub Bot commented on FLINK-4145:
---------------------------------------
Github user zentol commented on a diff in the pull request:
https://github.com/apache/flink/pull/2193#discussion_r69397170
--- Diff:
flink-core/src/test/java/org/apache/flink/metrics/reporter/JMXReporterTest.java
---
@@ -285,4 +289,23 @@ public long getMin() {
};
}
}
+
+ /**
+ * Sets the JMX port range config key based on the fork number.
+ * @param config Configuration instance to configure
+ * @return Passed configuration instance
+ */
+ private static Configuration setJmxPortRange(Configuration config) {
+ int forkNumber = 0;
+ try {
+ forkNumber =
Integer.parseInt(System.getProperty("forkNumber"));
+ } catch (NumberFormatException ignored) {
+ }
+
+ int minPort = 9000 + forkNumber * 100;
--- End diff --
what does the forkNumber bring us here? wouldn't it be better to use it for
the mapPort to increase the range of ports?
> JmxReporterTest fails due to port conflicts
> -------------------------------------------
>
> Key: FLINK-4145
> URL: https://issues.apache.org/jira/browse/FLINK-4145
> Project: Flink
> Issue Type: Bug
> Components: Local Runtime
> Reporter: Ufuk Celebi
> Assignee: Ufuk Celebi
> Labels: test-stability
> Fix For: 1.1.0
>
>
> I saw multiple failures of the {{JmxReporterTest}} most likely due to a port
> conflicts. The test relies on the default JMX reporter port range, which
> spans 5 ports. Running on Travis with multiple concurrent builds and bad
> timings, this can lead to port conflicts.
> Some example failed runs:
> https://s3.amazonaws.com/archive.travis-ci.org/jobs/141999066/log.txt (one
> out of 5 jobs failed)
> https://travis-ci.org/uce/flink/builds/141917901 (all 5 jobs failed)
> I propose to take the fork number into account (like the forkable Flink
> testing cluster) and configure a larger port range.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)