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

Prabhu Joseph commented on FLINK-31518:
---------------------------------------

Thanks for the pointers. [~vineethNaroju] and I have come up with a patch based 
on the above inputs.

{quote}And another one is which one is invoked first, the start of 
WebMonitorEndpoint or the creation of high available service?{quote}

High Availability Services {{StandaloneHaServices}} is initialised first with 
the configured {{clusterRestEndpointAddress}} which can be a range of ports, 
and then the {{RestServerEndpoint}} is started, which has the actual port.

The patch sets the configuration with the rest address and rest port, from 
which the {{StandaloneHaServices#getClusterRestEndpointLeaderRetriever}} 
retrieves the address and port. Similar ways are used in other places, like the 
one for the JobManager RPC Port.

This is the [WIP patch 
|https://github.com/PrabhuJoseph/flink/commit/45e268f3d446880b75a666b974d2188bec2e0132#diff-49ab603f69009cb6e7b652cb99570a0df71da897298a09acbc56bf29b42bbc6b].
 Please review it and let us know your comments.

> HighAvailabilityServiceUtils resolves wrong webMonitorAddress in Standalone 
> mode
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-31518
>                 URL: https://issues.apache.org/jira/browse/FLINK-31518
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Configuration, Runtime / REST
>    Affects Versions: 1.16.0, 1.17.0, 1.16.1, 1.17.1
>            Reporter: Vineeth Naroju
>            Priority: Major
>
> {{HighAvailabilityServiceUtils#createHighAvailabilityServices()}}  in 
> {{HighAvailabilityMode.NONE}} mode uses 
> {{HighAvailabilityServiceUtils#getWebMonitorAddress()}} to get web monitor 
> address.
> {{HighAvailabilityServiceUtils#getWebMonitorAddress()}} reads only from 
> {{rest.port}} in {{flink-conf.yaml}} . If {{rest.port}} is not enabled, then 
> it returns {{0}} port number. It should dynamically fetch port number if 
> {{rest.port}} is disabled.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to