Skip to content

IPV6 support not available #954

Closed
Closed

Description

@sholla

Expected behavior

If broker is configured to bind to ::1 or other IpV6 addresses, it should bind to the relevant address in that space.
Tell us what should happen
The broker and related should run correctly binding to the relevant IpV6 address

Actual behavior

Exception since protocol family is not supported.
Tell us what happens instead
Following exception occurs when running "pulsar standalone"
2017-12-10 17:10:36,026 - INFO - [main:ContextHandler@781] - Started o.e.j.s.ServletContextHandler@779de014{/ws/reader,null,AVAILABLE}
2017-12-10 17:10:36,026 - INFO - [main:ContextHandler@781] - Started o.e.j.s.h.ContextHandler@5c41d037{/static,null,AVAILABLE}
2017-12-10 17:10:36,028 - ERROR - [main:PulsarService@342] - java.net.SocketException: Protocol family unavailable
org.apache.pulsar.broker.PulsarServerException: java.net.SocketException: Protocol family unavailable
at org.apache.pulsar.broker.web.WebService.start(WebService.java:215)
at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:331)
at org.apache.pulsar.PulsarStandaloneStarter.start(PulsarStandaloneStarter.java:164)
at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:209)
Caused by: java.net.SocketException: Protocol family unavailable
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:317)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:390)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.apache.pulsar.broker.web.WebService.start(WebService.java:211)
... 3 more
Exception in thread "main" org.apache.pulsar.broker.PulsarServerException: org.apache.pulsar.broker.PulsarServerException: java.net.SocketException: Protocol family unavailable
at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:343)
at org.apache.pulsar.PulsarStandaloneStarter.start(PulsarStandaloneStarter.java:164)
at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:209)
Caused by: org.apache.pulsar.broker.PulsarServerException: java.net.SocketException: Protocol family unavailable
at org.apache.pulsar.broker.web.WebService.start(WebService.java:215)
at org.apache.pulsar.broker.PulsarService.start(PulsarService.java:331)
... 2 more
Caused by: java.net.SocketException: Protocol family unavailable
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:317)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:235)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:390)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.apache.pulsar.broker.web.WebService.start(WebService.java:211)
... 3 more

Steps to reproduce

How can we reproduce the issue
I have tried it with the standalone configuration(conf/standalone.conf) by setting bindAddress=::1 when the above exception occurs.

System configuration

Pulsar version: x.y
1.20

Activity

  1. added this to the 1.22.0-incubating milestone on Dec 11, 2017
  2. added
    type/bug
    on Dec 11, 2017
  3. merlimat commented on Dec 11, 2017

    @merlimat
    Contributor

    Thanks for reporting this @sholla. It looks like Jetty is not able to bind on IPv6 but netty server on 6650. Will try to get a fix soon.

  4. sholla commented on Dec 12, 2017

    @sholla
    Author

    ok @merlimat . Shall await then.

  5. sijie commented on Jul 18, 2018

    @sijie
    Member

    I think this is related to #1949

  6. added
    type/feature
    and removed
    type/bug
    on Jul 18, 2018
  7. removed this from the 2.2.0-incubating milestone on Sep 12, 2018
  8. sijie commented on Jan 14, 2020

    @sijie
    Member

    This is fixed by #5713

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/feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions