apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
13.94k stars 3.53k forks source link

[Bug] Unable to initialize Stream metadata #22936

Closed HeikoMueller closed 1 week ago

HeikoMueller commented 2 weeks ago

Search before asking

Read release policy

Version

Apache Pulsar 3.2.3 and 3.3.0 Java openjdk 17.0.10 2024-01-16

Minimal reproduce step

storageserver.grpc.port=4181
dlog.bkcEnsembleSize=3
dlog.bkcWriteQuorumSize=2
dlog.bkcAckQuorumSize=2
storage.range.store.dirs=data/bookkeeper/ranges
storage.serve.readonly.tables=false
storage.cluster.controller.schedule.interval.ms=30000
extraServerComponents=org.apache.bookkeeper.stream.server.StreamStorageLifecycleComponent

Re-initialize the Cluster with bin/bookkeeper shell initnewcluster

Start the bookies

What did you expect to see?

The bookies were starting without stream storage enabled without problems. With stream storage havnig enabled, the startup crashes.

What did you see instead?

ERROR org.apache.bookkeeper.common.compon ent.AbstractLifecycleComponent - Failed to start Component: storage-service org.apache.bookkeeper.stream.storage.exceptions.StorageRuntimeException: Failed to fetch cluster metadata from zookeeper @/stream/metadata
at org.apache.bookkeeper.stream.storage.impl.cluster.ZkClusterMetadataStore.getClusterMetadata(ZkClusterMetadataStore.java:201) ~[org.apache.bookkeeper-stream-storage-service-impl-4.16.5.jar:4.16.5] at org.apache.bookkeeper.stream.server.StorageServer.lambda$buildStor ageServer$2(StorageServer.java:328) ~[org.apache.bookkeeper-stream-storage-server-4.16.5.jar:4.16.5] at org.apache.bookkeeper.stream.storage.StorageContainerStoreBuilder.build(StorageContainerStoreBuilder.java:159) ~[org.apache.bookkeeper-stream-storage-service-impl-4.16.5.jar:4.16.5]
at org.apache.bookkeeper.stream.server.service.StorageService.doStart(StorageService.java:46) ~[org.apache.bookkeeper-stream-storage-server-4.16.5.jar:4.16.5]
at org.apache.bookkeeper.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:83) ~[org.apache.bookkeeper-bookkeeper-common-4.16.5.jar:4.16.5]

Anything else?

Looking at Zookeeper, I can see that the /stream/storage path has been initialized, but nothing else in sream (e.g. /metadata)

Are you willing to submit a PR?