apache / apache/pulsar

container terminated at 'Creating single directory db ledger storage' when setup in docker

Open
#11,464 1 comment 0 reactions 0 assignees View on GitHub
lifecycle/stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

OS: macOS
Version: 2.8.0
Command:
```
docker run -it \
-p 6650:6650 \
-p 8080:8080 \
--mount source=pulsardata,target=/pulsar/data \
--mount source=pulsarconf,target=/pulsar/conf \
apachepulsar/pulsar:2.8.0 \
bin/pulsar standalone
```

Then the container exit after:
```
09:31:20.084 [main] INFO org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage - Creating single directory db ledger storage on data/standalone/bookkeeper0/current
```

Total log shown below:
```
09:31:19.707 [main] INFO org.apache.bookkeeper.proto.BookieNettyServer - Binding bookie-rpc endpoint to 0.0.0.0/0.0.0.0:3181
09:31:19.813 [main] INFO org.apache.bookkeeper.meta.MetadataDrivers - BookKeeper metadata driver manager initialized
09:31:19.823 [main] INFO org.apache.bookkeeper.meta.zk.ZKMetadataDriverBase - Initialize zookeeper metadata driver at metadata service uri zk+null://127.0.0.1:2181/ledgers : zkServers = 127.0.0.1:2181, ledgersRootPath = /ledgers.
09:31:19.826 [main] INFO org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=10000 watcher=org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase@1440c311
09:31:19.826 [main] INFO org.apache.zookeeper.ClientCnxnSocket - jute.maxbuffer value is 10485760 Bytes
09:31:19.826 [main] INFO org.apache.zookeeper.ClientCnxn - zookeeper.request.timeout value is 0. feature enabled=false
09:31:19.829 [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Opening socket connection to server localhost/127.0.0.1:2181.
09:31:19.829 [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - SASL config status: Will not attempt to authenticate using SASL (unknown error)
09:31:19.829 [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Socket connection established, initiating session, client: /127.0.0.1:59300, server: localhost/127.0.0.1:2181
09:31:19.839 [main-SendThread(127.0.0.1:2181)] INFO org.apache.zookeeper.ClientCnxn - Session establishment complete on server localhost/127.0.0.1:2181, session id = 0x10002f58f010001, negotiated timeout = 10000
09:31:19.841 [main-EventThread] INFO org.apache.bookkeeper.zookeeper.ZooKeeperWatcherBase - ZooKeeper client is connected now.
09:31:19.865 [main] INFO org.apache.bookkeeper.discover.ZKRegistrationManager - INSTANCEID not exists in zookeeper. Not considering it for data verification
09:31:19.895 [main] INFO org.apache.bookkeeper.bookie.Bookie - Stamping new cookies on all dirs [data/standalone/bookkeeper0/current] [data/standalone/bookkeeper0/current]
09:31:20.043 [main] INFO org.apache.bookkeeper.bookie.Bookie - instantiate ledger manager org.apache.bookkeeper.meta.HierarchicalLedgerManagerFactory
09:31:20.070 [main] ERROR org.apache.bookkeeper.bookie.Journal - Problems reading from data/standalone/bookkeeper0/current/lastMark (this is okay if it is the first time starting this bookie
09:31:20.072 [main] INFO org.apache.bookkeeper.bookie.Bookie - Using ledger storage: org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage
09:31:20.077 [main] INFO org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage - Started Db Ledger Storage
09:31:20.077 [main] INFO org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage - - Number of directories: 1
09:31:20.077 [main] INFO org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage - - Write cache size: 1024 MB
09:31:20.078 [main] INFO org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage - - Read Cache: 1024 MB
09:31:20.084 [main] INFO org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage - Creating single directory db ledger storage on data/standalone/bookkeeper0/current
```

There is no log of error except:
```
09:31:20.070 [main] ERROR org.apache.bookkeeper.bookie.Journal - Problems reading from data/standalone/bookkeeper0/current/lastMark (this is okay if it is the first time starting this bookie
```
But it is the first time that I start this container

After creating single directory db ledger storage, the container exit.

Besides, I use binary package to setup pulsar , it works just fine

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported docker run command with apachepulsar/pulsar:2.8.0 and inspect why the container exits after the SingleDirectoryDbLedgerStorage message. Compare the Docker setup with the binary-package setup described in the issue; done means standalone remains running without the reported premature exit.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.