I use the same test code, but using  4.9.2 version  jar,  can create ledger
:(

Wei Liu <liuwe...@gmail.com> 于2019年12月4日周三 下午5:50写道:

> I use the zkCli.sh client to see that there is no new id under this path
> "/ledgers/00/0000".
>
> Flavio Junqueira <f...@apache.org> 于2019年12月4日周三 下午5:48写道:
>
>> Do you know if the ledger znode has been created in zk? Maybe use the
>> zkCli to check it.
>>
>> -Flavio
>>
>> On 4 Dec 2019, at 10:35, Wei Liu <liuwe...@gmail.com> wrote:
>>
>> Dear Enrico:
>>
>>    1) I don't see the new ledger id on zk
>>
>>    2)    It looks like the server is not return?
>>            at
>> java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
>>
>> at
>> java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1695)
>> at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
>> at
>> java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1775)
>> at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
>> at
>> org.apache.bookkeeper.client.SyncCallbackUtils.waitForResult(SyncCallbackUtils.java:55)
>> at
>> org.apache.bookkeeper.client.BookKeeper.createLedger(BookKeeper.java:918)
>> at
>> org.apache.bookkeeper.client.BookKeeper.createLedger(BookKeeper.java:870)
>> at
>> org.apache.bookkeeper.client.BookKeeper.createLedger(BookKeeper.java:851)
>> at com.mytest.App.CreateLedger(App.java:38)
>> at com.mytest.App.main(App.java:259)
>>
>>    3) Below is jvm stack:
>>
>>       Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.191-b12
>> mixed mode):
>>
>> "Attach Listener" #23 daemon prio=9 os_prio=0 tid=0x00007fbc18001000
>> nid=0x5636 waiting on condition [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> "main-EventThread" #21 daemon prio=5 os_prio=0 tid=0x00007fbc60645800
>> nid=0x55ff waiting on condition [0x00007fbc38c6d000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076ddd7868> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:504)
>> "main-SendThread(10.209.242.147:2181)" #20 daemon prio=5 os_prio=0
>> tid=0x00007fbc60649000 nid=0x55fe runnable [0x00007fbc38d6e000]
>>    java.lang.Thread.State: RUNNABLE
>> at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
>> at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
>> at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93)
>> at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
>> - locked <0x000000076dd86f50> (a sun.nio.ch.Util$3)
>> - locked <0x000000076dd86ec8> (a java.util.Collections$UnmodifiableSet)
>> - locked <0x000000076dd85b30> (a sun.nio.ch.EPollSelectorImpl)
>> at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
>> at
>> org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:349)
>>
>> at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1145)
>> "BookKeeperClientWorker-OrderedExecutor-7-0" #19 prio=5 os_prio=0
>> tid=0x00007fbc605ce800 nid=0x55fd waiting on condition [0x00007fbc39298000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076dac6570> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientWorker-OrderedExecutor-6-0" #18 prio=5 os_prio=0
>> tid=0x00007fbc605cd000 nid=0x55fc waiting on condition [0x00007fbc39399000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076dac3da8> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientWorker-OrderedExecutor-5-0" #17 prio=5 os_prio=0
>> tid=0x00007fbc605cb800 nid=0x55fb waiting on condition [0x00007fbc3949a000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076dac1630> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientWorker-OrderedExecutor-4-0" #16 prio=5 os_prio=0
>> tid=0x00007fbc605c9800 nid=0x55fa waiting on condition [0x00007fbc3959b000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076dabeeb8> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientWorker-OrderedExecutor-3-0" #15 prio=5 os_prio=0
>> tid=0x00007fbc605c8000 nid=0x55f9 waiting on condition [0x00007fbc3969c000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076dabc740> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientWorker-OrderedExecutor-2-0" #14 prio=5 os_prio=0
>> tid=0x00007fbc605c6000 nid=0x55f8 waiting on condition [0x00007fbc3979d000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076dab9f98> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientWorker-OrderedExecutor-1-0" #13 prio=5 os_prio=0
>> tid=0x00007fbc605c4800 nid=0x55f7 waiting on condition [0x00007fbc3989e000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076dab7820> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientWorker-OrderedExecutor-0-0" #12 prio=5 os_prio=0
>> tid=0x00007fbc605c3000 nid=0x55f6 waiting on condition [0x00007fbc3999f000]
>>    java.lang.Thread.State: WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076da97970> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
>>
>> at
>> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "BookKeeperClientScheduler-OrderedScheduler-0-0" #11 prio=5 os_prio=0
>> tid=0x00007fbc605b4800 nid=0x55f5 waiting on condition [0x00007fbc39aa0000]
>>    java.lang.Thread.State: TIMED_WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076d5fa668> (a
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>> at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
>> at
>> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
>>
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
>>
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
>>
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>>
>> at
>> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
>>
>> at java.lang.Thread.run(Thread.java:748)
>> "Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007fbc6021a800
>> nid=0x55f3 runnable [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> "C1 CompilerThread3" #8 daemon prio=9 os_prio=0 tid=0x00007fbc6020f800
>> nid=0x55f2 waiting on condition [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> "C2 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007fbc6020d800
>> nid=0x55f1 waiting on condition [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> "C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007fbc6020b800
>> nid=0x55f0 waiting on condition [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> "C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007fbc60208800
>> nid=0x55ef waiting on condition [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> "Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007fbc60207000
>> nid=0x55ee runnable [0x0000000000000000]
>>    java.lang.Thread.State: RUNNABLE
>> "Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007fbc601d5000 nid=0x55ed
>> in Object.wait() [0x00007fbc3aceb000]
>>    java.lang.Thread.State: WAITING (on object monitor)
>> at java.lang.Object.wait(Native Method)
>> - waiting on <0x000000076cb08ed0> (a java.lang.ref.ReferenceQueue$Lock)
>> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
>> - locked <0x000000076cb08ed0> (a java.lang.ref.ReferenceQueue$Lock)
>> at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
>> at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)
>> "Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007fbc601d2800
>> nid=0x55ec in Object.wait() [0x00007fbc3adec000]
>>    java.lang.Thread.State: WAITING (on object monitor)
>> at java.lang.Object.wait(Native Method)
>> - waiting on <0x000000076cb06bf8> (a java.lang.ref.Reference$Lock)
>> at java.lang.Object.wait(Object.java:502)
>> at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
>> - locked <0x000000076cb06bf8> (a java.lang.ref.Reference$Lock)
>> at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
>> "main" #1 prio=5 os_prio=0 tid=0x00007fbc6000b800 nid=0x55e2 waiting on
>> condition [0x00007fbc6975c000]
>>    java.lang.Thread.State: TIMED_WAITING (parking)
>> at sun.misc.Unsafe.park(Native Method)
>> - parking to wait for  <0x000000076f04d0b8> (a
>> java.util.concurrent.CompletableFuture$Signaller)
>> at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
>> at
>> java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1695)
>>
>> at java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3323)
>> at
>> java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1775)
>>
>> at
>> java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
>> at
>> org.apache.bookkeeper.client.SyncCallbackUtils.waitForResult(SyncCallbackUtils.java:55)
>>
>> at
>> org.apache.bookkeeper.client.BookKeeper.createLedger(BookKeeper.java:918)
>> at
>> org.apache.bookkeeper.client.BookKeeper.createLedger(BookKeeper.java:870)
>> at
>> org.apache.bookkeeper.client.BookKeeper.createLedger(BookKeeper.java:851)
>> at com.mytest.App.CreateLedger(App.java:38)
>> at com.mytest.App.main(App.java:259)
>> "VM Thread" os_prio=0 tid=0x00007fbc601c8800 nid=0x55eb runnable
>>
>> "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007fbc60021000
>> nid=0x55e3 runnable
>>
>> "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007fbc60023000
>> nid=0x55e4 runnable
>>
>> "GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007fbc60024800
>> nid=0x55e5 runnable
>>
>> "GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007fbc60026800
>> nid=0x55e6 runnable
>>
>> "GC task thread#4 (ParallelGC)" os_prio=0 tid=0x00007fbc60028000
>> nid=0x55e7 runnable
>>
>> "GC task thread#5 (ParallelGC)" os_prio=0 tid=0x00007fbc6002a000
>> nid=0x55e8 runnable
>>
>> "GC task thread#6 (ParallelGC)" os_prio=0 tid=0x00007fbc6002b800
>> nid=0x55e9 runnable
>>
>> "GC task thread#7 (ParallelGC)" os_prio=0 tid=0x00007fbc6002d800
>> nid=0x55ea runnable
>>
>> "VM Periodic Task Thread" os_prio=0 tid=0x00007fbc6021e000 nid=0x55f4
>> waiting on condition
>>
>> JNI global references: 392
>>
>>
>> Enrico Olivelli - Diennea <enrico.olive...@diennea.com> 于2019年12月4日周三
>> 下午3:48写道:
>>
>>> Liu,
>>>
>>>
>>>
>>> From your logs I see that the client is able to reach ZooKeeper, so I
>>> think that createLedger should complete.
>>>
>>> Are you sure that your program is not stuck at “addEntry” ?
>>>
>>> Is your client machine able to connect to the bookies ?
>>>
>>> You can dump the stacktrace of the JVM with jstack
>>>
>>>
>>>
>>> I suggest you to use the org.apache.bookkeeper.client.api package, the
>>> code is like this (I don’t have an IDE now, I am not sure it compiles, but
>>> it gives an idea):
>>>
>>>
>>>
>>> org.apache.bookkeeper.client.api.Bookkeeper bookkeeper =
>>> org.apache.bookkeeper.client.api.Bookkeeper.forConfig(config).build();
>>>
>>> org.apache.bookkeeper.client.api.WriteHandle handle =
>>> bookkeeper.newCreateLedgerOp()
>>>
>>>
>>> .withEnsembleSize(1)
>>>
>>>
>>>  .withWriteQuorumSize(1)
>>>
>>>
>>> .withAckQuorumSize(1)
>>>
>>>
>>> .withDigestType(DigestType.CRC32C)
>>>
>>>                                                              .execute()
>>>
>>>                                                              .get();
>>>
>>>       long entryId = handle.append("Some entry data".getBytes());
>>>
>>>       long entryId1 = handle. append ("111Some entry data".getBytes());
>>>
>>>       long entryId2 = handle. append ("222Some entry data".getBytes());
>>>
>>>
>>>
>>>    // always close a WriteHandle !!!
>>>
>>>   handle.close();
>>>
>>>
>>>
>>>
>>>
>>> Enrico
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Il giorno 04/12/19, 03:43 "Wei Liu" <liuwe...@gmail.com> ha scritto:
>>>
>>>
>>>
>>> Dear All:
>>>
>>>
>>>
>>>     I can't create ledger using bookkeeper 4.10.0 version.
>>>
>>>
>>>
>>>     Below is my test code:
>>>
>>>
>>>
>>>      static String connectionString = "xxx.xxx.xxx.xxx:2181";
>>>
>>>      bkClient = new BookKeeper(connectionString);
>>>
>>>
>>>
>>>       byte[] password = "some-password".getBytes();
>>>
>>>       handle = bkClient.createLedger(BookKeeper.DigestType.MAC,
>>> password);
>>>
>>>
>>>
>>>       long entryId = handle.addEntry("Some entry data".getBytes());
>>>
>>>       long entryId1 = handle.addEntry("111Some entry data".getBytes());
>>>
>>>       long entryId2 = handle.addEntry("222Some entry data".getBytes());
>>>
>>>
>>>
>>>     Stuck in 'createLedger' when the program is running.
>>>
>>>
>>>
>>>      Below is log:
>>>
>>>      2019-12-04 10:13:39,236 - INFO  - [main:MetadataDrivers@107] -
>>> BookKeeper metadata driver manager initialized
>>>
>>> 2019-12-04 10:13:39,239 - INFO  - [main:MetadataDrivers@107] -
>>> BookKeeper metadata driver manager initialized
>>>
>>> 2019-12-04 10:13:39,240 - INFO  - [main:MetadataDrivers@107] -
>>> BookKeeper metadata driver manager initialized
>>>
>>> 2019-12-04 10:13:39,247 - INFO  - [main:ZKMetadataDriverBase@192] -
>>> Initialize zookeeper metadata driver at metadata service uri
>>> zk+null://xxx.xxxx.xxx.xxx:2181/ledgers : zkServers = xxx.xxxx.xxx.xxx,
>>> ledgersRootPath = /ledgers.
>>>
>>> 2019-12-04 10:13:39,288 - INFO  -
>>> [main-EventThread:ZooKeeperWatcherBase@130] - ZooKeeper client is
>>> connected now.
>>>
>>> 2019-12-04 10:13:39,411 - ERROR -
>>> [main:RackawareEnsemblePlacementPolicyImpl@267] - Failed to initialize
>>> DNS Resolver org.apache.bookkeeper.net.ScriptBasedMapping, used default
>>> subnet resolver : java.lang.RuntimeException: No network topology script is
>>> found when using script based DNS resolver.
>>>
>>> 2019-12-04 10:13:39,430 - INFO  -
>>> [main:RackawareEnsemblePlacementPolicyImpl@214] - Initialize rackaware
>>> ensemble placement policy @ <Bookie:127.0.1.1:0> @ /default-rack :
>>> org.apache.bookkeeper.client.TopologyAwareEnsemblePlacementPolicy$DefaultResolver.
>>>
>>> 2019-12-04 10:13:39,430 - INFO  -
>>> [main:RackawareEnsemblePlacementPolicyImpl@224] - Not weighted
>>>
>>> 2019-12-04 10:13:39,433 - INFO  - [main:BookKeeper@509] - Weighted
>>> ledger placement is not enabled
>>>
>>> 2019-12-04 10:13:39,458 - INFO  -
>>> [BookKeeperClientScheduler-OrderedScheduler-0-0:NetworkTopologyImpl@429]
>>> - Adding a new node: /default-rack/xxx.xxxx.xxx.xxx:3181
>>>
>>> 2019-12-04 10:13:39,789 - INFO  -
>>> [BookKeeperClientScheduler-OrderedScheduler-0-0:NetworkTopologyImpl@429]
>>> - Adding a new node: /default-rack/xxx.xxxx.xxx.xxx:3181
>>>
>>> 2019-12-04 10:13:39,791 - INFO  -
>>> [BookKeeperClientScheduler-OrderedScheduler-0-0:NetworkTopologyImpl@429]
>>> - Adding a new node: /default-rack/xxx.xxxx.xxx.xxx:4181
>>>
>>> 2019-12-04 10:13:40,123 - INFO  -
>>> [BookKeeperClientScheduler-OrderedScheduler-0-0:NetworkTopologyImpl@429]
>>> - Adding a new node: /default-rack/xxx.xxxx.xxx.xxx:3181
>>>
>>> 11111
>>>
>>> 2019-12-04 10:13:40,153 - WARN  - [main:BookieWatcherImpl@240] - New
>>> ensemble: [xxx.xxxx.xxx.xxx:4181, xxx.xxxx.xxx.xxx:3181,
>>> xxx.xxxx.xxx.xxx:3181] is not adhering to Placement Policy.
>>> quarantinedBookies: []
>>>
>>> --
>>>
>>> 一个人只拥有今生今世是不够的,
>>> 他还应该拥有诗意的世界。
>>>
>>>        liuwe...@gmail.com
>>>
>>> ------------------------------
>>>
>>> CONFIDENTIALITY & PRIVACY NOTICE
>>> This e-mail (including any attachments) is strictly confidential and may
>>> also contain privileged information. If you are not the intended recipient
>>> you are not authorised to read, print, save, process or disclose this
>>> message. If you have received this message by mistake, please inform the
>>> sender immediately and destroy this e-mail, its attachments and any copies.
>>> Any use, distribution, reproduction or disclosure by any person other than
>>> the intended recipient is strictly prohibited and the person responsible
>>> may incur in penalties.
>>> The use of this e-mail is only for professional purposes; there is no
>>> guarantee that the correspondence towards this e-mail will be read only by
>>> the recipient, because, under certain circumstances, there may be a need to
>>> access this email by third subjects belonging to the Company.
>>>
>>
>>
>> --
>> 一个人只拥有今生今世是不够的,
>> 他还应该拥有诗意的世界。
>>
>>        liuwe...@gmail.com
>>
>>
>>
>
> --
> 一个人只拥有今生今世是不够的,
> 他还应该拥有诗意的世界。
>
>        liuwe...@gmail.com
>


-- 
一个人只拥有今生今世是不够的,
他还应该拥有诗意的世界。

       liuwe...@gmail.com

Reply via email to