You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bookkeeper.apache.org by Dongdong Guo <gu...@rd.netease.com> on 2011/12/21 08:57:13 UTC

Question of Bookkeeper about "static final String BOOKIE_REGISTRATION_PATH = "/ledgers/available/"

I download bookkeeper of  Release 4.0.0 version, than I modify the bk_server.conf as blow:

bookiePort=3181
zkLedgersRootPath=/ledger
journalDirectory=/disk1/guodd/bookkeeper/bk-txn
ledgerDirectories=/disk1/guodd/bookkeeper/bk-data
ledgerManagerType=flat
zkLedgersRootPath=/ledger
zkServers=sb052:2181,sb054:2181,sb056:2181
zkTimeout=10000
flushInterval=100

then, I start the bookkeeper using command "bin/bookkeeper bookie", the follow exception happened:

Exception in thread "main" java.io.IOException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /ledgers/available/10.168.2.52:3181
        at org.apache.bookkeeper.bookie.Bookie.registerBookie(Bookie.java:421)
        at org.apache.bookkeeper.bookie.Bookie.<init>(Bookie.java:346)
        at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:64)
        at org.apache.bookkeeper.proto.BookieServer.main(BookieServer.java:249)
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /ledgers/available/10.168.2.52:3181
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
        at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:778)
        at org.apache.bookkeeper.bookie.Bookie.registerBookie(Bookie.java:414)
        ... 3 more

I saw the source code, "static final String BOOKIE_REGISTRATION_PATH = "/ledgers/available/", user can not configure the BOOKIE_REGISTRATION_PATH , is it?, and how do i solve the problem

thanks

Re: Question of Bookkeeper about "static final String BOOKIE_REGISTRATION_PATH = "/ledgers/available/"

Posted by Ivan Kelly <iv...@yahoo-inc.com>.
Ah, this is an omission in the doc. You need to create /ledgers & /ledgers/available in zookeeper before running the cluster.

To do this, do
bin/bookkeeper org.apache.zookeeper.ZooKeeperMain -server sb052:2181 create /ledgers 0
bin/bookkeeper org.apache.zookeeper.ZooKeeperMain -server sb052:2181 create /ledgers/available 0

-Ivan

On 21 Dec 2011, at 08:57, Dongdong Guo wrote:

> I download bookkeeper of  Release 4.0.0 version, than I modify the bk_server.conf as blow:
> 
> bookiePort=3181
> zkLedgersRootPath=/ledger
> journalDirectory=/disk1/guodd/bookkeeper/bk-txn
> ledgerDirectories=/disk1/guodd/bookkeeper/bk-data
> ledgerManagerType=flat
> zkLedgersRootPath=/ledger
> zkServers=sb052:2181,sb054:2181,sb056:2181
> zkTimeout=10000
> flushInterval=100
> 
> then, I start the bookkeeper using command "bin/bookkeeper bookie", the follow exception happened:
> 
> Exception in thread "main" java.io.IOException: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /ledgers/available/10.168.2.52:3181
>        at org.apache.bookkeeper.bookie.Bookie.registerBookie(Bookie.java:421)
>        at org.apache.bookkeeper.bookie.Bookie.<init>(Bookie.java:346)
>        at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:64)
>        at org.apache.bookkeeper.proto.BookieServer.main(BookieServer.java:249)
> Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /ledgers/available/10.168.2.52:3181
>        at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
>        at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
>        at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:778)
>        at org.apache.bookkeeper.bookie.Bookie.registerBookie(Bookie.java:414)
>        ... 3 more
> 
> I saw the source code, "static final String BOOKIE_REGISTRATION_PATH = "/ledgers/available/", user can not configure the BOOKIE_REGISTRATION_PATH , is it?, and how do i solve the problem
> 
> thanks