bookkeeper can't work

40 views
Skip to first unread message

Chien

unread,
Aug 12, 2014, 5:05:44 AM8/12/14
to omid-p...@googlegroups.com
Hi!
I have some problem about bookkeeper can't work.
When server crush or turns off Omid timestamp still restarts from 1 again.

my steps:
1. Open Hadoop
2. omid-master/bin/omid.sh bktest
3. omid-master/bin/omid.sh tso

I had change the port in omid.sh to match my Zookeeper and checking bookkeeper is open.
Did I miss something to setup or operation error?

Ivan Kelly

unread,
Aug 12, 2014, 5:19:01 AM8/12/14
to Chien, omid-p...@googlegroups.com
Hi,

You need to tell omid to use bookkeeper for persistence, otherwise
it'll just store things in memory. Modify bin/omid.sh and append -ha
to the parameters in tso().

The persistence implementation in omid is quite fragile
though. There's no guarantee it will work.

-Ivan

Chien

unread,
Aug 13, 2014, 2:41:31 AM8/13/14
to omid-p...@googlegroups.com, darbyl...@gmail.com
HI,

Thx for your help but I met another problem when I start tso

this is the log error:
[23:29:12,640]ERROR     0[main-EventThread] - BookieWatcher.processResult(BookieWatcher.java:108) - Could not parse bookie address: readonly, ignoring this bookie
[23:29:12,685]ERROR    45[main] - BookKeeperStateBuilder.buildState(BookKeeperStateBuilder.java:267) - Error while creating bookkeeper object
java.io.IOException: Metadata version not compatible. Expected 1, but got 2
at org.apache.bookkeeper.meta.LedgerLayout.parseLayout(LedgerLayout.java:161)
at org.apache.bookkeeper.meta.LedgerLayout.readLayout(LedgerLayout.java:66)
at org.apache.bookkeeper.meta.LedgerManagerFactory.newLedgerManager(LedgerManagerFactory.java:59)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:180)
at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:147)
at com.yahoo.omid.tso.persistence.BookKeeperStateBuilder.buildState(BookKeeperStateBuilder.java:265)
at com.yahoo.omid.tso.persistence.BookKeeperStateBuilder.getState(BookKeeperStateBuilder.java:81)
at com.yahoo.omid.tso.TSOServer.run(TSOServer.java:117)
at com.yahoo.omid.tso.TSOServer.main(TSOServer.java:88)
[23:29:12,696]ERROR    56[main] - TSOServer.run(TSOServer.java:120) - Couldn't build state

shoud I need to modify java code or somewhere?

Ivan Kelly於 2014年8月12日星期二UTC+8下午5時19分01秒寫道:

Ivan Kelly

unread,
Aug 13, 2014, 6:31:47 AM8/13/14
to Chien, omid-p...@googlegroups.com
Omid uses bookkeeper 4.0.0. It looks like you are trying to use omid
with bookkeeper servers of version 4.2.2. Try it with servers of
4.0.0. Upgrading the version used by omid won't work, as you'll run
into a deadlock on recovery with anything newer than 4.0.0.

-Ivan
> --
> You received this message because you are subscribed to the Google Groups
> "Omid" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to omid-project...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Chien

unread,
Aug 18, 2014, 5:45:42 AM8/18/14
to omid-p...@googlegroups.com, darbyl...@gmail.com
I had start bookeeper-4.0.0 success by exec bin/bookeeper bookie
but here has some problem I really no idea how to solve it when I start bin/omid tso

full logs:
[17:33:04,158] WARN     0[main-EventThread] - BookKeeperStateBuilder$LedgerIdReadCallback.processResult(BookKeeperStateBuilder.java:202) - No node exists. NONODE
[17:33:04,167] WARN     9[main-EventThread] - ReadersAwareBuffer.<init>(ReadersAwareBuffer.java:38) - Allocated buffer
[17:33:04,179] WARN    21[main-EventThread] - ReadersAwareBuffer.<init>(ReadersAwareBuffer.java:38) - Allocated buffer
[17:33:04,231]ERROR    73[main-EventThread] - LedgerCreateOp.operationComplete(LedgerCreateOp.java:122) - Not enough bookies to create ledger2
[17:33:04,232]ERROR    74[main-EventThread] - BookKeeperStateLogger$1.createComplete(BookKeeperStateLogger.java:201) - Failed to create ledger. Not enough non-faulty bookies available
[17:33:04,234]ERROR    76[main-EventThread] - BookKeeperStateBuilder$1.loggerInitComplete(BookKeeperStateBuilder.java:294) - Error when initializing logger: BookKeeper operation failed

what should I adjust to run TSO collect


Ivan Kelly於 2014年8月13日星期三UTC+8下午6時31分47秒寫道:

Ivan Kelly

unread,
Aug 18, 2014, 5:51:18 AM8/18/14
to Chien, omid-p...@googlegroups.com
Bookkeeper is a replicated log service. Entries written to the log are
written to multiple servers, so that they are not lost in the event of
one server dying. The error you get is because you have only started
one bookie on one server, so the tso isn't able to write its log to
enough machines (it needs a minimum of 3 bookie machines available).
If you don't have 3 machines available, you can use bin/bookkeeper
localbookie <N>, where <N> is the number of bookies to start, 4 for
example. This will start 4 bookies on the local machine for testing.
This is only for testing though. The data isn't persisted across
restarts.

-Ivan

Chien

unread,
Aug 18, 2014, 6:17:14 AM8/18/14
to omid-p...@googlegroups.com, darbyl...@gmail.com
Thx a lot It work now

Ivan Kelly於 2014年8月18日星期一UTC+8下午5時51分18秒寫道:
Reply all
Reply to author
Forward
0 new messages