Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to fetch cluster metadata from zookeeper @/stream/metadata #2084

Open
rolish opened this issue May 5, 2019 · 3 comments
Open

Failed to fetch cluster metadata from zookeeper @/stream/metadata #2084

rolish opened this issue May 5, 2019 · 3 comments
Labels

Comments

@rolish
Copy link

rolish commented May 5, 2019

QUESTION
I'm trying to use streams with bookkeeper gprc.
Configmap:

apiVersion: v1
kind: ConfigMap
metadata:
    name: bookie-config
data:
    BK_BOOKIE_EXTRA_OPTS: "\"-Xms1g -Xmx1g -XX:MaxDirectMemorySize=1g -XX:+UseG1GC  -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB\""
    BK_bookiePort: "3181"
    BK_journalDirectory: "/bookkeeper/data/journal"
    BK_ledgerDirectories: "/bookkeeper/data/ledgers"
    BK_indexDirectories: "/bookkeeper/data/ledgers"
    BK_metadataServiceUri: "zk://zookeeper-1.x.com;zookeeper-2.x.com;zookeeper-3.x.com;zookeeper-4.x.com;zookeeper-5.x.com;zookeeper-6.x.com/ledgers"
    BK_httpServerEnabled: "true"
    BK_httpServerPort: "8080"
    # TODO: Issue 458: https://github.com/apache/bookkeeper/issues/458
    #BK_statsProviderClass: org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
    # use hostname as bookie id as bookie statefulset runs with hostnetwork: true
    BK_useHostNameAsBookieID: "false"
    BOOKIE_GRPC_PORT: "4181"
    BK_extraServerComponents: org.apache.bookkeeper.stream.server.StreamStorageLifecycleComponent

version:

image: apache/bookkeeper:4.9.1

Getting startup exception:

Exception in thread "main" org.apache.bookkeeper.stream.storage.exceptions.StorageRuntimeException: Failed to fetch cluster metadata from zookeeper @/stream/metadata

Attaching full log of bookie-0:

logs-from-bookie-in-bookie-0 (18).txt

@rolish
Copy link
Author

rolish commented May 6, 2019

zkCli.sh shows following objects (created by stream/distributedlog/core/src/main/java/org/apache/distributedlog/impl/BKNamespaceDriver.java) in zookeeper:

[zk: localhost:2181(CONNECTED) 5] ls /
[zookeeper, stream, ledgers]
[zk: localhost:2181(CONNECTED) 3] ls /stream
[storage]
[zk: localhost:2181(CONNECTED) 4] ls /stream/storage
[]

There is no /stream/metadata.

@ArvinDevel
Copy link
Contributor

Before you start up the cluster, you should init the cluster meta by using "bin/bkctl cluster init -n container number zkServers

@sijie
Copy link
Member

sijie commented Aug 18, 2019

@rolish does Arvin's comment answer you question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants