You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Function worker uses raw webService Port against adverisedListener and advertisedAddress #10951
Describe the bug
I am running Pulsar broker on docker and trying to run function worker as part of the broker. My advertisedListener IP is the IP of my host machine and I have a mapped worker port as well. But here, we are calling getAppliedAdvertisedAddress which returns my advertisedListner address and we are using the raw webServicePort against it. That code is 2 lines above. So it is forming a weird address advertisedAddress:webServicePort (hostMachineIP:dockerContainerPort) which is not allowing function workers to start. This has broken from Pulsar 2.8.0.
To Reproduce
Steps to reproduce the behavior:
Run any of the sink connectors in the broker.
Configure advertisedListner with the address that is different from the address where the broker is running.
Expected behavior
There should be consistency in address formation. Either we should use advertisedListner/advertisedAddress with its port or we should use both raw broker address and raw webServicePort.
Now the order of address acquisition is advertisedAddress, then advertisedListner, then hostname.
The problem now is that the address does not correspond to the port, right? @abhilashmandaliya
Now the order of address acquisition is advertisedAddress, then advertisedListner, then hostname.
The problem now is that the address does not correspond to the port, right? @abhilashmandaliya
I believe that the root cause is that Pulsar is erroneously using the configured advertisedListeners to formulate the web service endpoint in some cases. A reasonable fix would be to use only advertisedAddress:webServicePort for that purpose, and allow advertisedListeners to also be configured for the broker service endpoint.
Activity
abhilashmandaliya commentedon Jun 17, 2021
the same thing has happened with the broker address here. my health check is failing because of this.
Seems like commit [#10312] has caused this.
lhotari commentedon Jun 17, 2021
@315157973 Would you mind checking this?
315157973 commentedon Jun 17, 2021
Now the order of address acquisition is advertisedAddress, then advertisedListner, then hostname.
The problem now is that the address does not correspond to the port, right? @abhilashmandaliya
abhilashmandaliya commentedon Jun 18, 2021
@315157973 yes. that's correct.
Fix incorrect port of advertisedListener (#10961)
Fix incorrect port of advertisedListener (apache#10961)
Fix incorrect port of advertisedListener (#10961)
EronWright commentedon Sep 7, 2021
I believe that the root cause is that Pulsar is erroneously using the configured
advertisedListenersto formulate the web service endpoint in some cases. A reasonable fix would be to use onlyadvertisedAddress:webServicePortfor that purpose, and allowadvertisedListenersto also be configured for the broker service endpoint.Fix incorrect port of advertisedListener (apache#10961)