Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.19.1
-
None
Description
When I want flink on Yarn webui bind on 0.0.0.0 to listen Ipv4 & Ipv6 double stack, I found the ‘rest.bind-address' config will auto overwrite by here
package org.apache.flink.yarn.entrypoint; ```` public class YarnEntrypointUtils { ```` public static Configuration loadConfiguration( final Configuration configuration = GlobalConfiguration.loadConfiguration(workingDirectory, dynamicParameters); final String hostname =env.get(ApplicationConstants.Environment.NM_HOST.key()); configuration.set(JobManagerOptions.ADDRESS, hostname); configuration.set(RestOptions.ADDRESS, hostname); # overwrite hostname by code configuration.set(RestOptions.BIND_ADDRESS, hostname); ````` } }
In most case the are right. when user want config the ‘rest.bind-address' by slef , the customer config will be auto overwirte.
the best way is check the user config before the ovewrite. like this
public class YarnEntrypointUtils { ```` public static Configuration loadConfiguration( final Configuration configuration = GlobalConfiguration.loadConfiguration(workingDirectory, dynamicParameters); final String hostname =env.get(ApplicationConstants.Environment.NM_HOST.key()); configuration.set(JobManagerOptions.ADDRESS, hostname); configuration.set(RestOptions.ADDRESS, hostname); # check before the overwrite String bindAddress = configuration.getString(RestOptions.BIND_ADDRESS); if (StringUtils.isBlank(bindAddress)) { configuration.setString(RestOptions.BIND_ADDRESS, hostname); } ````` } }
Attachments
Issue Links
- duplicates
-
FLINK-35332 Manually setting rest.bind-address does not work for Flink running on Hadoop Yarn dual network environment
- Closed
- links to