[
https://issues.apache.org/jira/browse/FLINK-5758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15894060#comment-15894060
]
ASF GitHub Bot commented on FLINK-5758:
---------------------------------------
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/3391#discussion_r103204548
--- Diff:
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/WebRuntimeMonitor.java
---
@@ -414,19 +410,36 @@ protected void initChannel(SocketChannel ch) {
NioEventLoopGroup bossGroup = new NioEventLoopGroup(1);
NioEventLoopGroup workerGroup = new NioEventLoopGroup();
+
+ final String configuredAddress = cfg.getWebFrontendAddress();
+ final Iterator<Integer> configuredPortRange =
cfg.getWebFrontendPortRange();
+
this.bootstrap = new ServerBootstrap();
this.bootstrap
.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class)
.childHandler(initializer);
- ChannelFuture ch;
- if (configuredAddress == null) {
- ch = this.bootstrap.bind(configuredPort);
- } else {
- ch = this.bootstrap.bind(configuredAddress,
configuredPort);
+
+ try {
+ this.serverChannel =
NetUtils.createServerFromPorts(configuredAddress, configuredPortRange, new
NetUtils.ServerFactory<Channel>() {
+ @Override
+ public Channel create(String address, int port)
throws Exception {
+ ChannelFuture ch;
+ if (address == null) {
+ ch = bootstrap.bind(port);
+ } else {
+ ch = bootstrap.bind(address,
port);
+ LOG.info("Web frontend
listening at configuredAddress " + address );
--- End diff --
Maybe it's better to log the full address. Moreover, you should use the
placeholder syntax. And maybe it makes also sense to log it for the case where
`address==null`. In that case `InetAddress.anyLocalAddress` is used. Maybe we
could make this explicit and then log it.
> Port-range for the web interface via YARN
> -----------------------------------------
>
> Key: FLINK-5758
> URL: https://issues.apache.org/jira/browse/FLINK-5758
> Project: Flink
> Issue Type: Sub-task
> Components: YARN
> Affects Versions: 1.2.0, 1.1.4, 1.3.0
> Reporter: Kanstantsin Kamkou
> Assignee: Yelei Feng
> Labels: network
>
> In case of YARN, the {{ConfigConstants.JOB_MANAGER_WEB_PORT_KEY}} [is
> changed to
> 0|https://github.com/apache/flink/blob/release-1.2.0/flink-yarn/src/main/java/org/apache/flink/yarn/YarnApplicationMasterRunner.java#L526].
> Please allow port ranges in this case. DevOps need that.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)