You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "opencmit2 (via GitHub)" <gi...@apache.org> on 2025/04/28 10:27:37 UTC

[D] question:java.net.preferIPv4Stack ? [pulsar]

GitHub user opencmit2 created a discussion: question:java.net.preferIPv4Stack ?

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.


### Motivation

![Image](https://github.com/user-attachments/assets/184e6b45-2c17-4c2e-ba27-67294d38f2e2)
If you need to support both IPV4 and IPV6, do you need to change all the java.net.preferIPv4Stack=true to false?


### Solution

_No response_

### Alternatives

_No response_

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

GitHub link: https://github.com/apache/pulsar/discussions/24226

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org


Re: [D] question:java.net.preferIPv4Stack ? [pulsar]

Posted by "lhotari (via GitHub)" <gi...@apache.org>.
GitHub user lhotari added a comment to the discussion: question:java.net.preferIPv4Stack ?

> If you need to support both IPV4 and IPV6, do you need to change all the java.net.preferIPv4Stack=true to false?

Yes. Pass `-Djava.net.preferIPv4Stack=false` in `OPTS` environment variable. This is supported since https://github.com/apache/pulsar/pull/23846 .

IPv6 support for Pulsar deployments (Pulsar/BookKeeper/ZooKeeper) hasn't been validated in CI, so contributions might be required to fully support IPv6. I haven't personally tried to configure such a deployment so I'm not aware of other possible issues. It's possible that some locations in the code assume IPv4 address formats for parsing IP and port and that would fail with IPv6 addresses.

GitHub link: https://github.com/apache/pulsar/discussions/24226#discussioncomment-12968175

----
This is an automatically sent email for commits@pulsar.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@pulsar.apache.org