You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/05/23 13:13:52 UTC
[GitHub] [bookkeeper] tal705 opened a new issue, #3287: Can not recognize ipv6 ip when init zk
tal705 opened a new issue, #3287:
URL: https://github.com/apache/bookkeeper/issues/3287
**BUG REPORT**
***Describe the bug***
when I use pulsar script and run initialize-cluster-metadata, logs show an error that ipv6 ip is Invalid hostname.
logs (I use x to replace some character):
```
2022-04-21T17:55:33,814+0800 [main-EventThread] INFO org.apache.zookeeper.ClientCnxn - EventThread shut down for session: 0x300197585c701d9
Exception in thread "main" java.lang.IllegalArgumentException: Invalid hostname : [2409:xxxx:xxxx::1:xxxx:0919]:2181
at org.apache.bookkeeper.common.net.ServiceURI.validateHostName(ServiceURI.java:220)
at org.apache.bookkeeper.common.net.ServiceURI.lambda$create$0(ServiceURI.java:201)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.apache.bookkeeper.common.net.ServiceURI.create(ServiceURI.java:202)
at org.apache.bookkeeper.common.net.ServiceURI.create(ServiceURI.java:151)
at org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:225)
```
***To Reproduce***
Pulsar Version:2.9.2 (it use bookkeeper 4.14.4)
Zk can be connected.
Use Pulsar script `bin/pulsar`, then run command:
```
bin/pulsar initialize-cluster-metadata \
--cluster pulsar2921 \
--zookeeper [2409:xxxx:xxxx::1:xxxx:0919]:2181/pulsar/pulsar2921 \
--configuration-store [2409:xxxx:xxxx::1:xxxx:0919]:2181/pulsar/pulsar2921 \
--web-service-url http://brokerpulsar:8080/ \
--broker-service-url pulsar://brokerpulsar:6650/
```
***Expected behavior***
Solve this problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] boatrainlsz commented on issue #3287: Can not recognize ipv6 ip when init zk
Posted by GitBox <gi...@apache.org>.
boatrainlsz commented on issue #3287:
URL: https://github.com/apache/bookkeeper/issues/3287#issuecomment-1148759600
FYI:#1513
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [bookkeeper] MarvinCai commented on issue #3287: Can not recognize ipv6 ip when init zk
Posted by GitBox <gi...@apache.org>.
MarvinCai commented on issue #3287:
URL: https://github.com/apache/bookkeeper/issues/3287#issuecomment-1201269114
`bin/pulsar initialize-cluster-metadata` looks like the command to initialize cluster metadata for Pulsar cluster.
As in `bin/pulsar` script ipv6 support is explicitly disabled: https://github.com/apache/pulsar/blob/3f109d6cb7f128a5f8331e33477fd69c3c26d531/bin/pulsar#L275
But we can override it by using env var `export PULSAR_EXTRA_OPTS=-Djava.net.preferIPv4Stack=false`
Also if you were having trouble with bk metadata init we can use`export BOOKIE_EXTRA_OPTS=-Djava.net.preferIPv4Stack=false`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Can not recognize ipv6 ip when init zk [bookkeeper]
Posted by "visxu (via GitHub)" <gi...@apache.org>.
visxu commented on issue #3287:
URL: https://github.com/apache/bookkeeper/issues/3287#issuecomment-5791831724
> `bin/pulsar initialize-cluster-metadata` looks like the command to initialize cluster metadata for Pulsar cluster. As in `bin/pulsar` script ipv6 support is explicitly disabled: https://github.com/apache/pulsar/blob/3f109d6cb7f128a5f8331e33477fd69c3c26d531/bin/pulsar#L275 But we can override it by using env var `export PULSAR_EXTRA_OPTS=-Djava.net.preferIPv4Stack=false` Also if you were having trouble with bk metadata init we can use`export BOOKIE_EXTRA_OPTS=-Djava.net.preferIPv4Stack=false`
After adding env `export PULSAR_EXTRA_OPTS=-Djava.net.preferIPv4Stack=false`, pulsar init metadata still failed.
`./pulsar initialize-cluster-metadata \
--cluster local-vm \
--zookeeper "[240e:b67:4f0:2701:20c:29ff:fed2:a087]:2181" \
--configuration-store "[240e:b67:4f0:2701:20c:29ff:fed2:a087]:2181" \
--web-service-url http://mycluster.pulsar.org:8080 \
--broker-service-url pulsar://mycluster.pulsar.org:6650
`
Error log:
2026-09-23T16:45:44,297+0800 [main-EventThread] INFO org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase - ZooKeeper client is connected now.
2026-09-23T16:45:44,308+0800 [main] INFO org.apache.distributedlog.ZooKeeperClient - Close zookeeper client default.
2026-09-23T16:45:44,309+0800 [main] INFO org.apache.distributedlog.ZooKeeperClient - Closing zookeeper client default.
2026-09-23T16:45:44,415+0800 [main] INFO org.apache.zookeeper.ZooKeeper - Session: 0x3000144735a0011 closed
2026-09-23T16:45:44,415+0800 [main] INFO org.apache.distributedlog.ZooKeeperClient - Closed zookeeper client default.
Unexpected error occured.
java.lang.IllegalArgumentException: Invalid hostname : [240e:b67:4f0:2701:20c:29ff:fed2:a087]:2181
at org.apache.bookkeeper.common.net.ServiceURI.validateHostName(ServiceURI.java:220)
at org.apache.bookkeeper.common.net.ServiceURI.lambda$create$0(ServiceURI.java:201)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at org.apache.bookkeeper.common.net.ServiceURI.create(ServiceURI.java:202)
at org.apache.bookkeeper.common.net.ServiceURI.create(ServiceURI.java:151)
at org.apache.pulsar.PulsarClusterMetadataSetup.initializeCluster(PulsarClusterMetadataSetup.java:328)
at org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:280)
Terminating JVM...
2026-09-23T16:45:44,421+0800 [main-EventThread] INFO org.apache.zookeeper.ClientCnxn - EventThread shut down for session: 0x3000144735a0011
2026-09-23T16:45:44,422+0800 [main] WARN org.apache.pulsar.common.util.ShutdownUtil - Triggering immediate shutdown of current process with status 1
java.lang.Exception: Stacktrace for immediate shutdown
at org.apache.pulsar.common.util.ShutdownUtil.triggerImmediateForcefulShutdown(ShutdownUtil.java:55)
at org.apache.pulsar.common.util.ShutdownUtil.triggerImmediateForcefulShutdown(ShutdownUtil.java:50)
at org.apache.pulsar.common.util.ShutdownUtil.triggerImmediateForcefulShutdown(ShutdownUtil.java:82)
at org.apache.pulsar.PulsarClusterMetadataSetup.main(PulsarClusterMetadataSetup.java:285)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org