tillrohrmann commented on a change in pull request #11284: 
[FLINK-15911][runtime] Make Flink work with NAT.
URL: https://github.com/apache/flink/pull/11284#discussion_r396535358
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
 ##########
 @@ -269,19 +269,33 @@ public void start() throws Exception {
                                } else {
 
                                        // start a new service per component, 
possibly with custom bind addresses
+                                       final String jobManagerExternalAddress 
= miniClusterConfiguration.getJobManagerExternalAddress();
+                                       final String taskManagerExternalAddress 
= miniClusterConfiguration.getTaskManagerExternalAddress();
+                                       final String 
jobManagerExternalPortRange = 
miniClusterConfiguration.getJobManagerExternalPortRange();
+                                       final String 
taskManagerExternalPortRange = 
miniClusterConfiguration.getTaskManagerExternalPortRange();
                                        final String jobManagerBindAddress = 
miniClusterConfiguration.getJobManagerBindAddress();
                                        final String taskManagerBindAddress = 
miniClusterConfiguration.getTaskManagerBindAddress();
-                                       final String jobManagerBindPort = 
miniClusterConfiguration.getJobManagerBindPortRange();
-                                       final String taskManagerBindPort = 
miniClusterConfiguration.getTaskManagerBindPortRange();
+                                       final int jobManagerBindPort = 
miniClusterConfiguration.getJobManagerBindPort();
+                                       final int taskManagerBindPort = 
miniClusterConfiguration.getTaskManagerBindPort();
 
                                        
dispatcherResourceManagreComponentRpcServiceFactory =
-                                               new 
DedicatedRpcServiceFactory(configuration, jobManagerBindAddress, 
jobManagerBindPort);
+                                               new DedicatedRpcServiceFactory(
+                                                       configuration,
+                                                       
jobManagerExternalAddress,
+                                                       
jobManagerExternalPortRange,
 
 Review comment:
   Ok I see you have overridden the default `JobManagerOptions#PORT` value and 
set it to `0`. This should work.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to