Skip to content

IPv6 Support for broker and proxy with bindAddress #14732

Description

@0asys

Describe the bug
the default setting for binding in broker.conf and proxy.conf is bindAddress=0.0.0.0.

bindAddress=0.0.0.0

the specified default 0.0.0.0 binds to ipv4 only, so the service is not reachable over ipv6.

[root@proxy pulsar]# netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 0.0.0.0:6650            0.0.0.0:*               LISTEN      41186      8351118    2470721/java
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      41186      8349589    2470721/java

this setting does not accept a a ipv6 address [::0], ::0 or a ipv6 address with or without brackets.

available error in logs:

2022-03-17T10:52:55,986+0100 [sun.misc.Launcher$AppClassLoader@1d56ce6a] error Uncaught exception in thread main: Failed to bind Pulsar Proxy on port 6650

To Reproduce
Steps to reproduce the behavior:

  1. Set a ipv6 address in broker.conf or proxy.conf for bindAdress: bindAddress=[::0]
  2. restart pulsar broker or proxy
  3. check listening ports - no pulsar listen on ::6650

Expected behavior
pulsar broker and proxy listens on ipv6 address.

Desktop (please complete the following information):

  • OS: RedHat 8
  • Pulsar v2.9.1

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions