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

[PR] [fix][standalone] correctly delete bookie registration znode [pulsar]

nodece opened a new pull request, #23497:
URL: https://github.com/apache/pulsar/pull/23497

   ### Motivation
   
   Sometimes, the standalone server may not start because `/ledgers/available/%s` have not been deleted correctly, which introduces by https://github.com/apache/pulsar/pull/21407:
   
   ```
   2024-10-21T09:51:29,569+0000 [BookieStateManagerService-0] INFO  org.apache.bookkeeper.discover.ZKRegistrationManager - Previous bookie registration znode: /ledgers/available/bk0test exists, so waiting zk sessiontimeout: 10000 ms for znode deletion
   2024-10-21T09:51:29,570+0000 [BookieJournal-3181] INFO  org.apache.bookkeeper.bookie.JournalChannel - Opening journal data/standalone/bookkeeper0/current/192ae7cd847.txn
   2024-10-21T09:51:35,584+0000 [SessionTracker] INFO  org.apache.zookeeper.server.ZooKeeperServer - Expiring session 0x100091b67e50000, timeout of 6000ms exceeded
   2024-10-21T09:51:39,570+0000 [BookieStateManagerService-0] ERROR org.apache.bookkeeper.discover.ZKRegistrationManager - ZK exception checking and wait ephemeral znode /ledgers/available/bk0test expired : 
   org.apache.zookeeper.KeeperException$NodeExistsException: KeeperErrorCode = NodeExists for /ledgers/available/bk0test
   	at org.apache.bookkeeper.discover.ZKRegistrationManager.checkRegNodeAndWaitExpired(ZKRegistrationManager.java:198) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.discover.ZKRegistrationManager.doRegisterBookie(ZKRegistrationManager.java:264) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.discover.ZKRegistrationManager.registerBookie(ZKRegistrationManager.java:224) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.bookie.BookieStateManager.doRegisterBookie(BookieStateManager.java:293) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.bookie.BookieStateManager.doRegisterBookie(BookieStateManager.java:281) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.bookie.BookieStateManager$2.call(BookieStateManager.java:244) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.bookie.BookieStateManager$2.call(BookieStateManager.java:239) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
   	at java.lang.Thread.run(Unknown Source) ~[?:?]
   2024-10-21T09:51:39,575+0000 [main] ERROR org.apache.bookkeeper.bookie.Bookie - Couldn't register bookie with zookeeper, shutting down : 
   java.util.concurrent.ExecutionException: java.io.IOException: org.apache.bookkeeper.bookie.BookieException$MetadataStoreException: java.io.IOException: ZK exception checking and wait ephemeral znode /ledgers/available/bk0test expired
   	at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:?]
   	at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:?]
   	at org.apache.bookkeeper.bookie.BookieImpl.start(BookieImpl.java:722) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.proto.BookieServer.start(BookieServer.java:124) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.server.service.BookieService.doStart(BookieService.java:87) ~[org.apache.bookkeeper-bookkeeper-server-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:83) ~[org.apache.bookkeeper-bookkeeper-common-4.16.6.jar:4.16.6]
   	at org.apache.bookkeeper.common.component.LifecycleComponentStack.lambda$start$4(LifecycleComponentStack.java:144) ~[org.apache.bookkeeper-bookkeeper-common-4.16.6.jar:4.16.6]
   	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422) ~[com.google.guava-guava-32.1.1-jre.jar:?]
   	at org.apache.bookkeeper.common.component.LifecycleComponentStack.start(LifecycleComponentStack.java:144) ~[org.apache.bookkeeper-bookkeeper-common-4.16.6.jar:4.16.6]
   	at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startBK(LocalBookkeeperEnsemble.java:460) ~[com.ascentstream.pulsar-pulsar-broker-3.0.8.0-SNAPSHOT-16a7bcc.jar:3.0.8.0-SNAPSHOT-16a7bcc]
   	at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.runBookies(LocalBookkeeperEnsemble.java:326) ~[com.ascentstream.pulsar-pulsar-broker-3.0.8.0-SNAPSHOT-16a7bcc.jar:3.0.8.0-SNAPSHOT-16a7bcc]
   	at org.apache.pulsar.zookeeper.LocalBookkeeperEnsemble.startStandalone(LocalBookkeeperEnsemble.java:437) ~[com.ascentstream.pulsar-pulsar-broker-3.0.8.0-SNAPSHOT-16a7bcc.jar:3.0.8.0-SNAPSHOT-16a7bcc]
   	at org.apache.pulsar.PulsarStandalone.startBookieWithZookeeper(PulsarStandalone.java:482) ~[com.ascentstream.pulsar-pulsar-broker-3.0.8.0-SNAPSHOT-16a7bcc.jar:3.0.8.0-SNAPSHOT-16a7bcc]
   	at org.apache.pulsar.PulsarStandalone.start(PulsarStandalone.java:301) ~[com.ascentstream.pulsar-pulsar-broker-3.0.8.0-SNAPSHOT-16a7bcc.jar:3.0.8.0-SNAPSHOT-16a7bcc]
   	at org.apache.pulsar.PulsarStandaloneStarter.start(PulsarStandaloneStarter.java:121) ~[com.ascentstream.pulsar-pulsar-broker-3.0.8.0-SNAPSHOT-16a7bcc.jar:3.0.8.0-SNAPSHOT-16a7bcc]
   	at org.apache.pulsar.PulsarStandaloneStarter.main(PulsarStandaloneStarter.java:171) ~[com.ascentstream.pulsar-pulsar-broker-3.0.8.0-SNAPSHOT-16a7bcc.jar:3.0.8.0-SNAPSHOT-16a7bcc]
   Caused by: java.io.IOException: org.apache.bookkeeper.bookie.BookieException$MetadataStoreException: java.io.IOException: ZK exception checking and wait ephemeral znode /ledgers/available/bk0test expired
   ```
   
   ### Modifications
   
   - Delete the `/ledgers/available/$bookieAdvertisedAddress:$bookiePort` and `/ledgers/available/$bookieId` znodes before starting bk.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][standalone] correctly delete bookie registration znode [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece commented on PR #23497:
URL: https://github.com/apache/pulsar/pull/23497#issuecomment-2429852480

   /pulsarbot rerun-failure-checks


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [fix][standalone] correctly delete bookie registration znode [pulsar]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece merged PR #23497:
URL: https://github.com/apache/pulsar/pull/23497


-- 
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@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org