You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Andrea Cardaci <cy...@gmail.com> on 2019/12/08 11:23:21 UTC
Change Flink binding address in local mode
Hi,
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");
> config.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?
Best,
Andrea
Re: Change Flink binding address in local mode
Posted by Andrea Cardaci <cy...@gmail.com>.
On Mon, 9 Dec 2019 at 12:54, Chesnay Schepler <ch...@apache.org> wrote:
> At this point I would suggest to file a ticket
Here it is: https://issues.apache.org/jira/browse/FLINK-15154
Re: Change Flink binding address in local mode
Posted by Chesnay Schepler <ch...@apache.org>.
At this point I would suggest to file a ticket; these are the options
that _should_ control the behavior but apparently aren't in all cases.
On 08/12/2019 12:23, Andrea Cardaci wrote:
> Hi,
>
> 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");
>> config.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?
>
>
> Best,
> Andrea
>