apache / bookkeeper

Apache BookKeeper - a scalable, fault tolerant and low latency storage service optimized for append-only workloads
https://bookkeeper.apache.org/
Apache License 2.0
1.91k stars 905 forks source link

Docker-compose example not working #2212

Closed pedro93 closed 6 months ago

pedro93 commented 4 years ago

BUG REPORT

Describe the bug Tried to launch bookkeeper docker-compose environment locally but bookie containers failed, stating that bookkeeper metadata does not exist in zookeeper. This makes sense since every container was launched from scratch and the docker-compose file executes no logic to create said metadata. I would expect either the bookie node to create this metadata or have some logic in the docker-compose file that performs it.

To Reproduce

Steps to reproduce the behavior:

  1. Checkout repository
  2. In the docker folder execute docker-compose up -d

Expected behavior Docker-compose launched containers to be healthy and ready. Not the case

Screenshots Not a screenshot but here is the output of the command:

docker ps -a
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                              PORTS                                    NAMES
39439cc08650        caiok/bookkeeper-tutorial   "/bin/sh -c '/bin/sh…"   6 seconds ago       Up 4 seconds                                                                 docker_dice_1
a2b6528404ef        apache/bookkeeper           "/bin/bash /opt/book…"   9 seconds ago       Exited (2) Less than a second ago                                            docker_bookie3_1
e293db7298e1        apache/bookkeeper           "/bin/bash /opt/book…"   9 seconds ago       Exited (2) 2 seconds ago                                                     docker_bookie1_1
06deafd59daf        apache/bookkeeper           "/bin/bash /opt/book…"   9 seconds ago       Up 5 seconds (health: starting)     3181/tcp                                 docker_bookie2_1
7a0238738e39        zookeeper                   "/docker-entrypoint.…"   11 seconds ago      Up 9 seconds                        2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp   docker_zookeeper_1
docker-compose ps   
       Name                     Command               State                    Ports                 
-----------------------------------------------------------------------------------------------------
docker_bookie1_1     /bin/bash /opt/bookkeeper/ ...   Exit 2                                         
docker_bookie2_1     /bin/bash /opt/bookkeeper/ ...   Exit 2                                         
docker_bookie3_1     /bin/bash /opt/bookkeeper/ ...   Exit 2                                         
docker_dice_1        /bin/sh -c /bin/sh /local/ ...   Up                                             
docker_zookeeper_1   /docker-entrypoint.sh zkSe ...   Up       2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp

Bookie logs:

docker logs docker_bookie3_1
Environment Vars for bookie:

  [metadata service]
  BK_zkServers is zookeeper:2181
  BK_CLUSTER_ROOT_PATH is 
  BK_metadataServiceUri is zk://zookeeper:2181/ledgers

  [bookie]
  BK_bookiePort bookie service port is 3181
  BK_DATA_DIR is /data/bookkeeper
  BK_journalDirectory is /data/bookkeeper/journal
  BK_ledgerDirectories are /data/bookkeeper/ledgers
  BK_indexDirectories are /data/bookkeeper/ledgers

  [bookie http]
  BK_httpServerEnabled is true
  BK_httpServerPort is 

  [dlog]
  BK_dlogRootPath is /distributedlog

  [stream storage]
  BK_STREAM_STORAGE_ROOT_PATH is /stream
  BK_NUM_STORAGE_CONTAINERS is 32
  BOOKIE_GRPC_PORT is 
conf files: 
['/opt/bookkeeper/conf/jaas_example.conf', '/opt/bookkeeper/conf/log4j.properties', '/opt/bookkeeper/conf/bk_cli_env.sh', '/opt/bookkeeper/conf/log4j.cli.properties', '/opt/bookkeeper/conf/standalone.conf', '/opt/bookkeeper/conf/bkenv.sh', '/opt/bookkeeper/conf/zookeeper.conf.dynamic', '/opt/bookkeeper/conf/bk_server.conf', '/opt/bookkeeper/conf/log4j.shell.properties', '/opt/bookkeeper/conf/zookeeper.conf', '/opt/bookkeeper/conf/nettyenv.sh']
[/opt/bookkeeper/conf/bk_server.conf] Applying config bookiePort = 3181
[/opt/bookkeeper/conf/bk_server.conf] Applying config httpServerEnabled = true
[/opt/bookkeeper/conf/bk_server.conf] Applying config httpServerPort = 
[/opt/bookkeeper/conf/bk_server.conf] Applying config indexDirectories = /data/bookkeeper/ledgers
[/opt/bookkeeper/conf/bk_server.conf] Applying config journalDirectory = /data/bookkeeper/journal
[/opt/bookkeeper/conf/bk_server.conf] Applying config ledgerDirectories = /data/bookkeeper/ledgers
[/opt/bookkeeper/conf/bk_server.conf] Applying config metadataServiceUri = zk://zookeeper:2181/ledgers
[/opt/bookkeeper/conf/bk_server.conf] Applying config zkLedgersRootPath = /ledgers
[/opt/bookkeeper/conf/bk_server.conf] Applying config zkServers = zookeeper:2181
Created bookie dirs : 
  journal = /data/bookkeeper/journal
  ledger = /data/bookkeeper/ledgers
  index = /data/bookkeeper/ledgers
wait for zookeeper
Connecting to zookeeper:2181
2019-12-11 11:03:15,666 - INFO  - [main:Environment@100] - Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT
2019-12-11 11:03:15,668 - INFO  - [main:Environment@100] - Client environment:host.name=bookie3
2019-12-11 11:03:15,669 - INFO  - [main:Environment@100] - Client environment:java.version=1.8.0_201
2019-12-11 11:03:15,671 - INFO  - [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2019-12-11 11:03:15,672 - INFO  - [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre
2019-12-11 11:03:15,672 - INFO  - [main:Environment@100] - Client environment:java.class.path=/opt/bookkeeper/conf:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-server-4.9.0.jar::/opt/bookkeeper/lib/com.beust-jcommander-1.48.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-annotations-2.9.7.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-core-2.9.7.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-databind-2.9.7.jar:/opt/bookkeeper/lib/com.google.api.grpc-proto-google-common-protos-1.0.0.jar:/opt/bookkeeper/lib/com.google.auth-google-auth-library-credentials-0.9.0.jar:/opt/bookkeeper/lib/com.google.code.gson-gson-2.7.jar:/opt/bookkeeper/lib/com.google.errorprone-error_prone_annotations-2.1.2.jar:/opt/bookkeeper/lib/com.google.guava-guava-21.0.jar:/opt/bookkeeper/lib/com.google.protobuf-protobuf-java-3.5.1.jar:/opt/bookkeeper/lib/com.google.protobuf-protobuf-java-util-3.5.1.jar:/opt/bookkeeper/lib/com.google.protobuf.nano-protobuf-javanano-3.0.0-alpha-5.jar:/opt/bookkeeper/lib/com.squareup.okhttp-okhttp-2.5.0.jar:/opt/bookkeeper/lib/com.squareup.okio-okio-1.13.0.jar:/opt/bookkeeper/lib/com.yahoo.datasketches-memory-0.8.3.jar:/opt/bookkeeper/lib/com.yahoo.datasketches-sketches-core-0.8.3.jar:/opt/bookkeeper/lib/commons-cli-commons-cli-1.2.jar:/opt/bookkeeper/lib/commons-codec-commons-codec-1.6.jar:/opt/bookkeeper/lib/commons-configuration-commons-configuration-1.10.jar:/opt/bookkeeper/lib/commons-io-commons-io-2.4.jar:/opt/bookkeeper/lib/commons-lang-commons-lang-2.6.jar:/opt/bookkeeper/lib/commons-logging-commons-logging-1.1.1.jar:/opt/bookkeeper/lib/io.grpc-grpc-all-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-auth-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-context-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-core-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-netty-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-okhttp-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-lite-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-nano-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-stub-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-testing-1.12.0.jar:/opt/bookkeeper/lib/io.netty-netty-buffer-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-dns-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-http-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-http2-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-socks-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-common-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-handler-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-handler-proxy-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-resolver-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-resolver-dns-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-tcnative-boringssl-static-2.0.19.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-native-epoll-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-native-unix-common-4.1.31.Final.jar:/opt/bookkeeper/lib/io.opencensus-opencensus-api-0.11.0.jar:/opt/bookkeeper/lib/io.opencensus-opencensus-contrib-grpc-metrics-0.11.0.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_common-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_hotspot-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_servlet-0.0.21.jar:/opt/bookkeeper/lib/io.vertx-vertx-auth-common-3.4.1.jar:/opt/bookkeeper/lib/io.vertx-vertx-core-3.4.1.jar:/opt/bookkeeper/lib/io.vertx-vertx-web-3.4.1.jar:/opt/bookkeeper/lib/javax.servlet-javax.servlet-api-3.1.0.jar:/opt/bookkeeper/lib/jline-jline-2.11.jar:/opt/bookkeeper/lib/log4j-log4j-1.2.17.jar:/opt/bookkeeper/lib/net.java.dev.jna-jna-3.2.7.jar:/opt/bookkeeper/lib/net.jpountz.lz4-lz4-1.3.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-common-allocator-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-proto-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-framework-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-ledger-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-circe-checksum-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-cpu-affinity-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-statelib-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-cli-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-java-client-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-service-api-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-service-impl-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.http-http-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.http-vertx-http-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.stats-bookkeeper-stats-api-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.stats-prometheus-metrics-provider-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.tests-stream-storage-tests-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.commons-commons-collections4-4.1.jar:/opt/bookkeeper/lib/org.apache.commons-commons-lang3-3.6.jar:/opt/bookkeeper/lib/org.apache.curator-curator-client-4.0.1.jar:/opt/bookkeeper/lib/org.apache.curator-curator-framework-4.0.1.jar:/opt/bookkeeper/lib/org.apache.curator-curator-recipes-4.0.1.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-core-4.9.0-tests.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-core-4.9.0.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-protocol-4.9.0.jar:/opt/bookkeeper/lib/org.apache.yetus-audience-annotations-0.5.0.jar:/opt/bookkeeper/lib/org.apache.zookeeper-zookeeper-3.4.13.jar:/opt/bookkeeper/lib/org.codehaus.jackson-jackson-core-asl-1.9.11.jar:/opt/bookkeeper/lib/org.codehaus.jackson-jackson-mapper-asl-1.9.11.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-http-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-io-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-security-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-server-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-servlet-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-util-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.inferred-freebuilder-1.14.9.jar:/opt/bookkeeper/lib/org.jctools-jctools-core-2.1.2.jar:/opt/bookkeeper/lib/org.rocksdb-rocksdbjni-5.13.1.jar:/opt/bookkeeper/lib/org.slf4j-slf4j-api-1.7.25.jar:/opt/bookkeeper/lib/org.slf4j-slf4j-log4j12-1.7.25.jar:
2019-12-11 11:03:15,673 - INFO  - [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2019-12-11 11:03:15,673 - INFO  - [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2019-12-11 11:03:15,673 - INFO  - [main:Environment@100] - Client environment:java.compiler=<NA>
2019-12-11 11:03:15,673 - INFO  - [main:Environment@100] - Client environment:os.name=Linux
2019-12-11 11:03:15,673 - INFO  - [main:Environment@100] - Client environment:os.arch=amd64
2019-12-11 11:03:15,674 - INFO  - [main:Environment@100] - Client environment:os.version=4.15.0-70-generic
2019-12-11 11:03:15,674 - INFO  - [main:Environment@100] - Client environment:user.name=root
2019-12-11 11:03:15,674 - INFO  - [main:Environment@100] - Client environment:user.home=/root
2019-12-11 11:03:15,674 - INFO  - [main:Environment@100] - Client environment:user.dir=/opt/bookkeeper
2019-12-11 11:03:15,676 - INFO  - [main:ZooKeeper@442] - Initiating client connection, connectString=zookeeper:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@782830e
2019-12-11 11:03:15,715 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server zookeeper/192.168.48.2:2181. Will not attempt to authenticate using SASL (unknown error)
2019-12-11 11:03:15,788 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@879] - Socket connection established to zookeeper/192.168.48.2:2181, initiating session
2019-12-11 11:03:15,799 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@1303] - Session establishment complete on server zookeeper/192.168.48.2:2181, sessionid = 0x1000fd21e490002, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
[zookeeper]
Connecting to zookeeper:2181
2019-12-11 11:03:16,653 - INFO  - [main:Environment@100] - Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT
2019-12-11 11:03:16,655 - INFO  - [main:Environment@100] - Client environment:host.name=bookie3
2019-12-11 11:03:16,655 - INFO  - [main:Environment@100] - Client environment:java.version=1.8.0_201
2019-12-11 11:03:16,659 - INFO  - [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2019-12-11 11:03:16,659 - INFO  - [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre
2019-12-11 11:03:16,659 - INFO  - [main:Environment@100] - Client environment:java.class.path=/opt/bookkeeper/conf:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-server-4.9.0.jar::/opt/bookkeeper/lib/com.beust-jcommander-1.48.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-annotations-2.9.7.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-core-2.9.7.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-databind-2.9.7.jar:/opt/bookkeeper/lib/com.google.api.grpc-proto-google-common-protos-1.0.0.jar:/opt/bookkeeper/lib/com.google.auth-google-auth-library-credentials-0.9.0.jar:/opt/bookkeeper/lib/com.google.code.gson-gson-2.7.jar:/opt/bookkeeper/lib/com.google.errorprone-error_prone_annotations-2.1.2.jar:/opt/bookkeeper/lib/com.google.guava-guava-21.0.jar:/opt/bookkeeper/lib/com.google.protobuf-protobuf-java-3.5.1.jar:/opt/bookkeeper/lib/com.google.protobuf-protobuf-java-util-3.5.1.jar:/opt/bookkeeper/lib/com.google.protobuf.nano-protobuf-javanano-3.0.0-alpha-5.jar:/opt/bookkeeper/lib/com.squareup.okhttp-okhttp-2.5.0.jar:/opt/bookkeeper/lib/com.squareup.okio-okio-1.13.0.jar:/opt/bookkeeper/lib/com.yahoo.datasketches-memory-0.8.3.jar:/opt/bookkeeper/lib/com.yahoo.datasketches-sketches-core-0.8.3.jar:/opt/bookkeeper/lib/commons-cli-commons-cli-1.2.jar:/opt/bookkeeper/lib/commons-codec-commons-codec-1.6.jar:/opt/bookkeeper/lib/commons-configuration-commons-configuration-1.10.jar:/opt/bookkeeper/lib/commons-io-commons-io-2.4.jar:/opt/bookkeeper/lib/commons-lang-commons-lang-2.6.jar:/opt/bookkeeper/lib/commons-logging-commons-logging-1.1.1.jar:/opt/bookkeeper/lib/io.grpc-grpc-all-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-auth-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-context-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-core-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-netty-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-okhttp-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-lite-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-nano-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-stub-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-testing-1.12.0.jar:/opt/bookkeeper/lib/io.netty-netty-buffer-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-dns-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-http-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-http2-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-socks-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-common-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-handler-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-handler-proxy-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-resolver-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-resolver-dns-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-tcnative-boringssl-static-2.0.19.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-native-epoll-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-native-unix-common-4.1.31.Final.jar:/opt/bookkeeper/lib/io.opencensus-opencensus-api-0.11.0.jar:/opt/bookkeeper/lib/io.opencensus-opencensus-contrib-grpc-metrics-0.11.0.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_common-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_hotspot-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_servlet-0.0.21.jar:/opt/bookkeeper/lib/io.vertx-vertx-auth-common-3.4.1.jar:/opt/bookkeeper/lib/io.vertx-vertx-core-3.4.1.jar:/opt/bookkeeper/lib/io.vertx-vertx-web-3.4.1.jar:/opt/bookkeeper/lib/javax.servlet-javax.servlet-api-3.1.0.jar:/opt/bookkeeper/lib/jline-jline-2.11.jar:/opt/bookkeeper/lib/log4j-log4j-1.2.17.jar:/opt/bookkeeper/lib/net.java.dev.jna-jna-3.2.7.jar:/opt/bookkeeper/lib/net.jpountz.lz4-lz4-1.3.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-common-allocator-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-proto-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-framework-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-ledger-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-circe-checksum-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-cpu-affinity-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-statelib-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-cli-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-java-client-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-service-api-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-service-impl-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.http-http-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.http-vertx-http-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.stats-bookkeeper-stats-api-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.stats-prometheus-metrics-provider-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.tests-stream-storage-tests-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.commons-commons-collections4-4.1.jar:/opt/bookkeeper/lib/org.apache.commons-commons-lang3-3.6.jar:/opt/bookkeeper/lib/org.apache.curator-curator-client-4.0.1.jar:/opt/bookkeeper/lib/org.apache.curator-curator-framework-4.0.1.jar:/opt/bookkeeper/lib/org.apache.curator-curator-recipes-4.0.1.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-core-4.9.0-tests.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-core-4.9.0.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-protocol-4.9.0.jar:/opt/bookkeeper/lib/org.apache.yetus-audience-annotations-0.5.0.jar:/opt/bookkeeper/lib/org.apache.zookeeper-zookeeper-3.4.13.jar:/opt/bookkeeper/lib/org.codehaus.jackson-jackson-core-asl-1.9.11.jar:/opt/bookkeeper/lib/org.codehaus.jackson-jackson-mapper-asl-1.9.11.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-http-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-io-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-security-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-server-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-servlet-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-util-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.inferred-freebuilder-1.14.9.jar:/opt/bookkeeper/lib/org.jctools-jctools-core-2.1.2.jar:/opt/bookkeeper/lib/org.rocksdb-rocksdbjni-5.13.1.jar:/opt/bookkeeper/lib/org.slf4j-slf4j-api-1.7.25.jar:/opt/bookkeeper/lib/org.slf4j-slf4j-log4j12-1.7.25.jar:
2019-12-11 11:03:16,660 - INFO  - [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2019-12-11 11:03:16,660 - INFO  - [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2019-12-11 11:03:16,660 - INFO  - [main:Environment@100] - Client environment:java.compiler=<NA>
2019-12-11 11:03:16,661 - INFO  - [main:Environment@100] - Client environment:os.name=Linux
2019-12-11 11:03:16,661 - INFO  - [main:Environment@100] - Client environment:os.arch=amd64
2019-12-11 11:03:16,661 - INFO  - [main:Environment@100] - Client environment:os.version=4.15.0-70-generic
2019-12-11 11:03:16,661 - INFO  - [main:Environment@100] - Client environment:user.name=root
2019-12-11 11:03:16,661 - INFO  - [main:Environment@100] - Client environment:user.home=/root
2019-12-11 11:03:16,661 - INFO  - [main:Environment@100] - Client environment:user.dir=/opt/bookkeeper
2019-12-11 11:03:16,665 - INFO  - [main:ZooKeeper@442] - Initiating client connection, connectString=zookeeper:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@782830e
2019-12-11 11:03:16,706 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server zookeeper/192.168.48.2:2181. Will not attempt to authenticate using SASL (unknown error)
2019-12-11 11:03:16,805 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@879] - Socket connection established to zookeeper/192.168.48.2:2181, initiating session
2019-12-11 11:03:16,818 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@1303] - Session establishment complete on server zookeeper/192.168.48.2:2181, sessionid = 0x1000fd21e490004, negotiated timeout = 30000

WATCHER::

WatchedEvent state:SyncConnected type:None path:null
Node does not exist: /stream
Metadata of cluster already exists, no need to init
This is root, will use user bookkeeper to run command '/opt/bookkeeper/bin/bookkeeper bookie'
2019-12-11 11:03:19,653 - INFO  - [main:Main@112] - Using configuration file /opt/bookkeeper/conf/bk_server.conf
2019-12-11 11:03:19,659 - INFO  - [main:Main@269] - Hello, I'm your bookie, listening on port 3181. Metadata service uri is zk://zookeeper:2181/ledgers. Journals are in [/data/bookkeeper/journal]. Ledgers are stored in /data/bookkeeper/ledgers.
2019-12-11 11:03:19,675 - INFO  - [main:Main@298] - Load lifecycle component : org.apache.bookkeeper.server.service.StatsProviderService
2019-12-11 11:03:19,893 - INFO  - [main:BookieServer@97] - {
  "storage.cluster.controller.schedule.interval.ms" : "30000",
  "zkEnableSecurity" : "false",
  "dlog.bkcAckQuorumSize" : "2",
  "indexDirectories" : "/data/bookkeeper/ledgers",
  "zkServers" : "zookeeper:2181",
  "zkLedgersRootPath" : "/ledgers",
  "storage.range.store.dirs" : "data/bookkeeper/ranges",
  "httpServerPort" : "",
  "dlog.bkcWriteQuorumSize" : "2",
  "bookiePort" : "3181",
  "storage.serve.readonly.tables" : "false",
  "ledgerDirectories" : "/data/bookkeeper/ledgers",
  "zkTimeout" : "10000",
  "httpServerClass" : "org.apache.bookkeeper.http.vertx.VertxHttpServer",
  "httpServerEnabled" : "true",
  "metadataServiceUri" : "zk://zookeeper:2181/ledgers",
  "dlog.bkcEnsembleSize" : "3",
  "storageserver.grpc.port" : "4181",
  "journalDirectory" : "/data/bookkeeper/journal"
}
2019-12-11 11:03:20,033 - WARN  - [main:EventLoopUtil@81] - Could not use Netty Epoll event loop: failed to load the required native library
2019-12-11 11:03:20,190 - INFO  - [main:MetadataDrivers@107] - BookKeeper metadata driver manager initialized
2019-12-11 11:03:20,190 - INFO  - [main:MetadataDrivers@107] - BookKeeper metadata driver manager initialized
2019-12-11 11:03:20,191 - INFO  - [main:MetadataDrivers@107] - BookKeeper metadata driver manager initialized
2019-12-11 11:03:20,207 - INFO  - [main:ZKMetadataDriverBase@187] - Initialize zookeeper metadata driver at metadata service uri zk://zookeeper:2181/ledgers : zkServers = zookeeper:2181, ledgersRootPath = /ledgers.
2019-12-11 11:03:20,218 - INFO  - [main:Environment@100] - Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT
2019-12-11 11:03:20,218 - INFO  - [main:Environment@100] - Client environment:host.name=bookie3
2019-12-11 11:03:20,218 - INFO  - [main:Environment@100] - Client environment:java.version=1.8.0_201
2019-12-11 11:03:20,219 - INFO  - [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2019-12-11 11:03:20,219 - INFO  - [main:Environment@100] - Client environment:java.home=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-2.el7_6.x86_64/jre
2019-12-11 11:03:20,219 - INFO  - [main:Environment@100] - Client environment:java.class.path=/opt/bookkeeper/conf:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-server-4.9.0.jar::/opt/bookkeeper/lib/com.beust-jcommander-1.48.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-annotations-2.9.7.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-core-2.9.7.jar:/opt/bookkeeper/lib/com.fasterxml.jackson.core-jackson-databind-2.9.7.jar:/opt/bookkeeper/lib/com.google.api.grpc-proto-google-common-protos-1.0.0.jar:/opt/bookkeeper/lib/com.google.auth-google-auth-library-credentials-0.9.0.jar:/opt/bookkeeper/lib/com.google.code.gson-gson-2.7.jar:/opt/bookkeeper/lib/com.google.errorprone-error_prone_annotations-2.1.2.jar:/opt/bookkeeper/lib/com.google.guava-guava-21.0.jar:/opt/bookkeeper/lib/com.google.protobuf-protobuf-java-3.5.1.jar:/opt/bookkeeper/lib/com.google.protobuf-protobuf-java-util-3.5.1.jar:/opt/bookkeeper/lib/com.google.protobuf.nano-protobuf-javanano-3.0.0-alpha-5.jar:/opt/bookkeeper/lib/com.squareup.okhttp-okhttp-2.5.0.jar:/opt/bookkeeper/lib/com.squareup.okio-okio-1.13.0.jar:/opt/bookkeeper/lib/com.yahoo.datasketches-memory-0.8.3.jar:/opt/bookkeeper/lib/com.yahoo.datasketches-sketches-core-0.8.3.jar:/opt/bookkeeper/lib/commons-cli-commons-cli-1.2.jar:/opt/bookkeeper/lib/commons-codec-commons-codec-1.6.jar:/opt/bookkeeper/lib/commons-configuration-commons-configuration-1.10.jar:/opt/bookkeeper/lib/commons-io-commons-io-2.4.jar:/opt/bookkeeper/lib/commons-lang-commons-lang-2.6.jar:/opt/bookkeeper/lib/commons-logging-commons-logging-1.1.1.jar:/opt/bookkeeper/lib/io.grpc-grpc-all-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-auth-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-context-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-core-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-netty-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-okhttp-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-lite-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-protobuf-nano-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-stub-1.12.0.jar:/opt/bookkeeper/lib/io.grpc-grpc-testing-1.12.0.jar:/opt/bookkeeper/lib/io.netty-netty-buffer-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-dns-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-http-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-http2-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-codec-socks-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-common-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-handler-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-handler-proxy-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-resolver-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-resolver-dns-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-tcnative-boringssl-static-2.0.19.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-native-epoll-4.1.31.Final.jar:/opt/bookkeeper/lib/io.netty-netty-transport-native-unix-common-4.1.31.Final.jar:/opt/bookkeeper/lib/io.opencensus-opencensus-api-0.11.0.jar:/opt/bookkeeper/lib/io.opencensus-opencensus-contrib-grpc-metrics-0.11.0.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_common-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_hotspot-0.0.21.jar:/opt/bookkeeper/lib/io.prometheus-simpleclient_servlet-0.0.21.jar:/opt/bookkeeper/lib/io.vertx-vertx-auth-common-3.4.1.jar:/opt/bookkeeper/lib/io.vertx-vertx-core-3.4.1.jar:/opt/bookkeeper/lib/io.vertx-vertx-web-3.4.1.jar:/opt/bookkeeper/lib/javax.servlet-javax.servlet-api-3.1.0.jar:/opt/bookkeeper/lib/jline-jline-2.11.jar:/opt/bookkeeper/lib/log4j-log4j-1.2.17.jar:/opt/bookkeeper/lib/net.java.dev.jna-jna-3.2.7.jar:/opt/bookkeeper/lib/net.jpountz.lz4-lz4-1.3.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-common-allocator-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-proto-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-framework-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-bookkeeper-tools-ledger-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-circe-checksum-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-cpu-affinity-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-statelib-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-cli-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-java-client-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-service-api-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper-stream-storage-service-impl-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.http-http-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.http-vertx-http-server-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.stats-bookkeeper-stats-api-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.stats-prometheus-metrics-provider-4.9.0.jar:/opt/bookkeeper/lib/org.apache.bookkeeper.tests-stream-storage-tests-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.commons-commons-collections4-4.1.jar:/opt/bookkeeper/lib/org.apache.commons-commons-lang3-3.6.jar:/opt/bookkeeper/lib/org.apache.curator-curator-client-4.0.1.jar:/opt/bookkeeper/lib/org.apache.curator-curator-framework-4.0.1.jar:/opt/bookkeeper/lib/org.apache.curator-curator-recipes-4.0.1.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-common-4.9.0.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-core-4.9.0-tests.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-core-4.9.0.jar:/opt/bookkeeper/lib/org.apache.distributedlog-distributedlog-protocol-4.9.0.jar:/opt/bookkeeper/lib/org.apache.yetus-audience-annotations-0.5.0.jar:/opt/bookkeeper/lib/org.apache.zookeeper-zookeeper-3.4.13.jar:/opt/bookkeeper/lib/org.codehaus.jackson-jackson-core-asl-1.9.11.jar:/opt/bookkeeper/lib/org.codehaus.jackson-jackson-mapper-asl-1.9.11.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-http-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-io-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-security-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-server-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-servlet-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.eclipse.jetty-jetty-util-9.4.5.v20170502.jar:/opt/bookkeeper/lib/org.inferred-freebuilder-1.14.9.jar:/opt/bookkeeper/lib/org.jctools-jctools-core-2.1.2.jar:/opt/bookkeeper/lib/org.rocksdb-rocksdbjni-5.13.1.jar:/opt/bookkeeper/lib/org.slf4j-slf4j-api-1.7.25.jar:/opt/bookkeeper/lib/org.slf4j-slf4j-log4j12-1.7.25.jar:
2019-12-11 11:03:20,220 - INFO  - [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2019-12-11 11:03:20,222 - INFO  - [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2019-12-11 11:03:20,222 - INFO  - [main:Environment@100] - Client environment:java.compiler=<NA>
2019-12-11 11:03:20,222 - INFO  - [main:Environment@100] - Client environment:os.name=Linux
2019-12-11 11:03:20,222 - INFO  - [main:Environment@100] - Client environment:os.arch=amd64
2019-12-11 11:03:20,222 - INFO  - [main:Environment@100] - Client environment:os.version=4.15.0-70-generic
2019-12-11 11:03:20,223 - INFO  - [main:Environment@100] - Client environment:user.name=bookkeeper
2019-12-11 11:03:20,223 - INFO  - [main:Environment@100] - Client environment:user.home=/home/bookkeeper
2019-12-11 11:03:20,223 - INFO  - [main:Environment@100] - Client environment:user.dir=/opt/bookkeeper
2019-12-11 11:03:20,226 - INFO  - [main:ZooKeeper@442] - Initiating client connection, connectString=zookeeper:2181 sessionTimeout=10000 watcher=org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase@2e55dd0c
2019-12-11 11:03:20,250 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server zookeeper/192.168.48.2:2181. Will not attempt to authenticate using SASL (unknown error)
2019-12-11 11:03:20,256 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@879] - Socket connection established to zookeeper/192.168.48.2:2181, initiating session
2019-12-11 11:03:20,270 - INFO  - [main-SendThread(zookeeper:2181):ClientCnxn$SendThread@1303] - Session establishment complete on server zookeeper/192.168.48.2:2181, sessionid = 0x1000fd21e490009, negotiated timeout = 10000
2019-12-11 11:03:20,274 - INFO  - [main-EventThread:ZooKeeperWatcherBase@130] - ZooKeeper client is connected now.
2019-12-11 11:03:20,304 - ERROR - [main:ZKRegistrationManager@379] - BookKeeper metadata doesn't exist in zookeeper. Has the cluster been initialized? Try running bin/bookkeeper shell metaformat
2019-12-11 11:03:20,304 - INFO  - [main:BookieNettyServer@424] - Shutting down BookieNettyServer
2019-12-11 11:03:20,317 - ERROR - [main:Main@223] - Failed to build bookie server
org.apache.bookkeeper.bookie.BookieException$MetadataStoreException: Failed to get cluster instance id
    at org.apache.bookkeeper.discover.ZKRegistrationManager.getClusterInstanceId(ZKRegistrationManager.java:392)
    at org.apache.bookkeeper.bookie.Bookie.checkEnvironmentWithStorageExpansion(Bookie.java:408)
    at org.apache.bookkeeper.bookie.Bookie.checkEnvironment(Bookie.java:252)
    at org.apache.bookkeeper.bookie.Bookie.<init>(Bookie.java:691)
    at org.apache.bookkeeper.proto.BookieServer.newBookie(BookieServer.java:137)
    at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:106)
    at org.apache.bookkeeper.server.service.BookieService.<init>(BookieService.java:43)
    at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:301)
    at org.apache.bookkeeper.server.Main.doMain(Main.java:221)
    at org.apache.bookkeeper.server.Main.main(Main.java:203)
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for BookKeeper metadata
    at org.apache.bookkeeper.discover.ZKRegistrationManager.getClusterInstanceId(ZKRegistrationManager.java:382)
    ... 9 more

Additional context Bookkeeper branch: release-4.10.0-docker, locally compiled before trying to run example.

liangyuanpeng commented 4 years ago

Still not working.

I had try docker/docker-compose.yml and deploy/docker-compose/docker-compose.yaml

bookie1_1    | 2020-09-04 01:28:59,578 - ERROR - [main:ZKRegistrationManager@379] - BookKeeper metadata doesn't exist in zookeeper. Has the cluster been initialized? Try running bin/bookkeeper shell metaformat
bookie1_1    | 2020-09-04 01:28:59,580 - INFO  - [main:BookieNettyServer@424] - Shutting down BookieNettyServer
bookie1_1    | 2020-09-04 01:28:59,593 - ERROR - [main:Main@223] - Failed to build bookie server
bookie1_1    | org.apache.bookkeeper.bookie.BookieException$MetadataStoreException: Failed to get cluster instance id
bookie1_1    |  at org.apache.bookkeeper.discover.ZKRegistrationManager.getClusterInstanceId(ZKRegistrationManager.java:392)
bookie1_1    |  at org.apache.bookkeeper.bookie.Bookie.checkEnvironmentWithStorageExpansion(Bookie.java:408)
bookie1_1    |  at org.apache.bookkeeper.bookie.Bookie.checkEnvironment(Bookie.java:252)
bookie1_1    |  at org.apache.bookkeeper.bookie.Bookie.<init>(Bookie.java:691)
bookie1_1    |  at org.apache.bookkeeper.proto.BookieServer.newBookie(BookieServer.java:137)
bookie1_1    |  at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:106)
bookie1_1    |  at org.apache.bookkeeper.server.service.BookieService.<init>(BookieService.java:43)
bookie1_1    |  at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:301)
bookie1_1    |  at org.apache.bookkeeper.server.Main.doMain(Main.java:221)
bookie1_1    |  at org.apache.bookkeeper.server.Main.main(Main.java:203)
bookie1_1    | Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for BookKeeper metadata
bookie1_1    |  at org.apache.bookkeeper.discover.ZKRegistrationManager.getClusterInstanceId(ZKRegistrationManager.java:382)
bookie1_1    |  ... 9 more
docker_bookie1_1 exited with code 2

Actually, deploy/kubernetes/gke/bookkeeper.yaml have same problem.

eolivelli commented 4 years ago

@liangyuanpeng I have reopened the case.

Do you want to help in fixing it ?

lifepuzzlefun commented 4 years ago

docker-compose pull the image apache/bookkeeper:latest from dockerhub. which is still the old version. not apply the previous change. update the lastest image point to 4.10 or upper can help bookie start successfuly

you can see the latest image is still 1 year ago. https://hub.docker.com/r/apache/bookkeeper/tags

@eolivelli @sijie

rodrigoreis commented 4 years ago

I've to:

zhiheng123 commented 6 months ago

I had success to exec docker-compose up -d in ubuntu. here is the result:

root@zzh-MACHR-xxx:/mnt/d/opensource/bookkeeper/docker# docker-compose ps
       Name                     Command                  State                       Ports                 
-----------------------------------------------------------------------------------------------------------
docker_bookie1_1     /bin/bash /opt/bookkeeper/ ...   Up (healthy)   3181/tcp, 8080/tcp                    
docker_bookie2_1     /bin/bash /opt/bookkeeper/ ...   Up (healthy)   3181/tcp, 8080/tcp                    
docker_bookie3_1     /bin/bash /opt/bookkeeper/ ...   Up (healthy)   3181/tcp, 8080/tcp                    
docker_dice_1        /bin/sh -c /bin/sh /local/ ...   Up                                                   
docker_zookeeper_1   /docker-entrypoint.sh zkSe ...   Up             2181/tcp, 2888/tcp, 3888/tcp, 8080/tcp
shoothzj commented 6 months ago

I think it's fixed by #4364