Skip to content

Function worker uses raw webService Port against adverisedListener and advertisedAddress #10951

Closed

Description

@abhilashmandaliya

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:

  1. Run any of the sink connectors in the broker.
  2. 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.

Activity

  1. added
    type/bug
    on Jun 17, 2021
  2. abhilashmandaliya commented on Jun 17, 2021

    @abhilashmandaliya
    ContributorAuthor

    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.

  3. lhotari commented on Jun 17, 2021

    @lhotari
    Member

    @315157973 Would you mind checking this?

  4. 315157973 commented on Jun 17, 2021

    @315157973
    Contributor

    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

  5. abhilashmandaliya commented on Jun 18, 2021

    @abhilashmandaliya
    ContributorAuthor

    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

    @315157973 yes. that's correct.

  6. added a commit that references this issue on Jun 22, 2021
    99c84c4
  7. added a commit that references this issue on Jun 23, 2021
    ca705ee
  8. added a commit that references this issue on Jun 25, 2021
    d7bff1e
  9. EronWright commented on Sep 7, 2021

    @EronWright
    Contributor

    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.

  10. added a commit that references this issue on Mar 18, 2022
    eb0b319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions