Assigning a port range to rest.port

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Assigning a port range to rest.port

Gyula Fóra
Hi!
Is there any way currently to set a port range for the rest client? rest.port only takes a single number and it is anyways overwritten to 0.

This seems to be necessary when running the flink client from behind a firewall where only a predefined port-range is accessible from the outside.

I would assume this is a common setup in prod environments. This hasn't been a problem with the legacy execution mode.

Any thoughts?
Gyula
Reply | Threaded
Open this post in threaded view
|

Re: Assigning a port range to rest.port

Jeff Zhang
This requirement makes sense to me. Another issue I hit due to single value of rest port is that user can not start 2 local MiniCluster, I try to start 2 flink scala-shell in local mode, but fails due to port conflict. 



Gyula Fóra <[hidden email]> 于2018年12月5日周三 下午8:04写道:
Hi!
Is there any way currently to set a port range for the rest client? rest.port only takes a single number and it is anyways overwritten to 0.

This seems to be necessary when running the flink client from behind a firewall where only a predefined port-range is accessible from the outside.

I would assume this is a common setup in prod environments. This hasn't been a problem with the legacy execution mode.

Any thoughts?
Gyula


--
Best Regards

Jeff Zhang
Reply | Threaded
Open this post in threaded view
|

Re: Assigning a port range to rest.port

Gyula Fóra
Maybe the problem is here? cc Till 
 
https://github.com/apache/flink/blob/44ed5ef0fc1c221f3916ab5126f1bc8ee5dfb45d/flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnEntrypointUtils.java#L83
https://github.com/apache/flink/blob/44ed5ef0fc1c221f3916ab5126f1bc8ee5dfb45d/flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnEntrypointUtils.java#L101




Jeff Zhang <[hidden email]> ezt írta (időpont: 2018. dec. 5., Sze, 13:13):
This requirement makes sense to me. Another issue I hit due to single value of rest port is that user can not start 2 local MiniCluster, I try to start 2 flink scala-shell in local mode, but fails due to port conflict. 



Gyula Fóra <[hidden email]> 于2018年12月5日周三 下午8:04写道:
Hi!
Is there any way currently to set a port range for the rest client? rest.port only takes a single number and it is anyways overwritten to 0.

This seems to be necessary when running the flink client from behind a firewall where only a predefined port-range is accessible from the outside.

I would assume this is a common setup in prod environments. This hasn't been a problem with the legacy execution mode.

Any thoughts?
Gyula


--
Best Regards

Jeff Zhang
Reply | Threaded
Open this post in threaded view
|

Re: Assigning a port range to rest.port

Till Rohrmann
Hi Gyula and Jeff,

I think at the moment it is not possible to define a port range for the REST client. Maybe we should add something similar to the RestOptions#BIND_ADDRESS, namely introducing a RestOptions#BIND_PORT which can define a port range for the binding port. RestOptions#PORT will only be considered on the client side to learn where to connect to. I've created a corresponding JIRA issue to add this feature [1].


Cheers,
Till

On Wed, Dec 5, 2018 at 1:21 PM Gyula Fóra <[hidden email]> wrote:
Maybe the problem is here? cc Till 
 
https://github.com/apache/flink/blob/44ed5ef0fc1c221f3916ab5126f1bc8ee5dfb45d/flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnEntrypointUtils.java#L83
https://github.com/apache/flink/blob/44ed5ef0fc1c221f3916ab5126f1bc8ee5dfb45d/flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnEntrypointUtils.java#L101




Jeff Zhang <[hidden email]> ezt írta (időpont: 2018. dec. 5., Sze, 13:13):
This requirement makes sense to me. Another issue I hit due to single value of rest port is that user can not start 2 local MiniCluster, I try to start 2 flink scala-shell in local mode, but fails due to port conflict. 



Gyula Fóra <[hidden email]> 于2018年12月5日周三 下午8:04写道:
Hi!
Is there any way currently to set a port range for the rest client? rest.port only takes a single number and it is anyways overwritten to 0.

This seems to be necessary when running the flink client from behind a firewall where only a predefined port-range is accessible from the outside.

I would assume this is a common setup in prod environments. This hasn't been a problem with the legacy execution mode.

Any thoughts?
Gyula


--
Best Regards

Jeff Zhang
Reply | Threaded
Open this post in threaded view
|

Re: Assigning a port range to rest.port

Gyula Fóra
Thank you Till :)

Gy

Till Rohrmann <[hidden email]> ezt írta (időpont: 2018. dec. 5., Sze, 16:20):
Hi Gyula and Jeff,

I think at the moment it is not possible to define a port range for the REST client. Maybe we should add something similar to the RestOptions#BIND_ADDRESS, namely introducing a RestOptions#BIND_PORT which can define a port range for the binding port. RestOptions#PORT will only be considered on the client side to learn where to connect to. I've created a corresponding JIRA issue to add this feature [1].


Cheers,
Till

On Wed, Dec 5, 2018 at 1:21 PM Gyula Fóra <[hidden email]> wrote:
Maybe the problem is here? cc Till 
 
https://github.com/apache/flink/blob/44ed5ef0fc1c221f3916ab5126f1bc8ee5dfb45d/flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnEntrypointUtils.java#L83
https://github.com/apache/flink/blob/44ed5ef0fc1c221f3916ab5126f1bc8ee5dfb45d/flink-yarn/src/main/java/org/apache/flink/yarn/entrypoint/YarnEntrypointUtils.java#L101




Jeff Zhang <[hidden email]> ezt írta (időpont: 2018. dec. 5., Sze, 13:13):
This requirement makes sense to me. Another issue I hit due to single value of rest port is that user can not start 2 local MiniCluster, I try to start 2 flink scala-shell in local mode, but fails due to port conflict. 



Gyula Fóra <[hidden email]> 于2018年12月5日周三 下午8:04写道:
Hi!
Is there any way currently to set a port range for the rest client? rest.port only takes a single number and it is anyways overwritten to 0.

This seems to be necessary when running the flink client from behind a firewall where only a predefined port-range is accessible from the outside.

I would assume this is a common setup in prod environments. This hasn't been a problem with the legacy execution mode.

Any thoughts?
Gyula


--
Best Regards

Jeff Zhang