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

Xintong Song commented on FLINK-15154:
--------------------------------------

Updates:

After FLINK-15911, there are still two ports that Flink binds to whose binding 
address is not configurable.
- Blob server
- Metrics query RPC service

I've opened a PR trying to fix this issue, with the following changes.
- Make Blob server respect the configuration option 'jobmanager.bind-host' 
(introduced by FLINK-15911)
- Make metrics query RPC service use Akka local actor system in local execution 
mode, to avoid unnecessary port binding.

> Change Flink binding addresses in local mode
> --------------------------------------------
>
>                 Key: FLINK-15154
>                 URL: https://issues.apache.org/jira/browse/FLINK-15154
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Coordination
>    Affects Versions: 1.9.1
>         Environment: ```
> $ uname -a
> Linux xxx 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 
> GNU/Linux
> ```
>            Reporter: Andrea Cardaci
>            Assignee: Xintong Song
>            Priority: Minor
>              Labels: pull-request-available, usability
>
> Flink (or some of its services) listens on three random TCP ports
> during the local[1] execution, e.g., 39951, 41009 and 42849.
> [1]: 
> https://ci.apache.org/projects/flink/flink-docs-stable/dev/local_execution.html#local-environment
> The sockets listens on `0.0.0.0` and since I need to run some
> long-running tests on an Internet-facing machine I was wondering how
> to make them listen on `localhost` instead or if there is anything
> else I can do to improve the security in this scenario.
> Here's what I tried (with little luck):
> ```
> Configuration config = new Configuration();
> config.setString("taskmanager.host", "127.0.0.1");
> cconfig.setString("rest.bind-address", "127.0.0.1"); // OK
> config.setString("jobmanager.rpc.address", "127.0.0.1");
> StreamExecutionEnvironment env = 
> StreamExecutionEnvironment.createLocalEnvironment(StreamExecutionEnvironment.getDefaultLocalParallelism(),
>  config);
> ```
> Only the `rest.bind-address` configuration actually changes the
> binding address of one of those ports. Are there other parameters that
> I'm not aware of or this is not the right approach in local mode?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to