Closed pedro93 closed 6 months 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.
@liangyuanpeng I have reopened the case.
Do you want to help in fixing it ?
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
I've to:
environment:
- BK_zkServers=zk1:2181,zk2:2181,zk3:2181
- BK_zkLedgersRootPath=/ledgers
- BK_metadataServiceUri=zk://zk1:2181/ledgers,zk://zk2:2181/ledgers,zk://zk3:2181/ledgers
- BK_httpServerPort=8080
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
I think it's fixed by #4364
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:
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:
Bookie logs:
Additional context Bookkeeper branch: release-4.10.0-docker, locally compiled before trying to run example.