Repository navigation
Closed
Labels
Description
BUG REPORT
Describe the bug
We have a cluster of Bookkeeper with 3 servers.
For example we can considered (bk1,bk2 and bk3). We writing only inside bk1 and bk2 , and bk3 read from bk2.
When bk2 come down bk3 continue to search reading from bk2.
We expected if bk2 come down, bk3 should try to read from bk1 and not continue to try with bk2.
20-02-24-12-35-21 While readLastConfirmed ledger: 19734 did not hear success responses from all quorums
20-02-24-12-35-27 While readLastConfirmed ledger: 19734 did not hear success responses from all quorums
20-02-24-12-35-33 While readLastConfirmed ledger: 19734 did not hear success responses from all quorums
20-02-24-12-35-39 While readLastConfirmed ledger: 19734 did not hear success responses from all quorums
20-02-24-12-33-30 Could not connect to bookie: [id: 0xa6f88d56, L:/ip-bk3:37224]/bk2:3181, current state CONNECTING :
20-02-24-12-33-30 io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: No route to host: bk2/ip-address:3181
io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(..) failed: No route to host: bk2/ip-address:3181
at io.netty.channel.unix.Errors.throwConnectException(Errors.java:112)
at io.netty.channel.unix.Socket.finishConnect(Socket.java:269)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.doFinishConnect(AbstractEpollChannel.java:670)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.finishConnect(AbstractEpollChannel.java:647)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.epollOutReady(AbstractEpollChannel.java:527)
at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:422)
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:333)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:906)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.net.ConnectException: finishConnect(..) failed: No route to host
... 11 more
To reproduce it , follow my description above
Activity
sijie commentedon Feb 24, 2020
@hamadodene It attempts to read from bk-2. but it seems that bk-2 is not reachable -
No route to host: bk2/ip-address:3181eolivelli commentedon Feb 24, 2020
I talked offline about this issue with @hamadodene .
The ledger is written with WQ=2 and ledger metadata point that segment to bk1 and bk2 bookies.
The client (reader) is on bk3.
It seems that BK is trying only to read from bk3.
The case here is that bk2 machine has been forcibly partitioned away from network.
@hamadodene please correct me if I am wrong.
Do you have more logs?
hamadodene commentedon Feb 25, 2020
@eolivelli yes is correct,
bk2 had been partitioned from the network.
We were writing on bookkeeeper with replica 2 (precisely at that moment on bk1 and bk2) and at that moment bk3 was reading the data from bk2.
When bk2 was partitioned, we expected bk3 to read from bk1 after a few minutes. Instead after 30 minutes he was still trying to read the data from bk2.
I have this expection from bk3 logs:
eolivelli commentedon Mar 5, 2020
Finally we realized the "problem", it is not a strictly a bug in BookKeeper but it is a very unexpected behaviour that needs a workaround in the application and a workaround is not always possible.
The scenario is the following:
It looks like that even a recovery read is not possible in this case.
The workaround is to write (and block until a successful acknowledge) an entry to the ledger before adding the ledger to the list of "active ledgers", this way you are sure that each bookie knows about the ledger and does not answer NoSuchLedger.
With QA < WQ this workaround won't work, because the write of entry 0 may not be acklowledged by Bookie1 (the one running during the open action) but the client will consider it successfully written (because Bookie2 at the time of the write is up and running).
cc @hamadodene @aluccaroni @ivankelly @fpj @jvrao @sijie
ivankelly commentedon Apr 3, 2020
@eolivelli
We've hit this internally also, coverage sets are broken.
See my comment: https://github.com/apache/bookkeeper/pull/2281/files#r403306604
eolivelli commentedon Apr 3, 2020
@ivankelly thanks for sharing.
Your comment is useful
@rdhabalia please take a look
This is something we must fix in next release.
ivankelly commentedon Apr 3, 2020
As I said in the linked comment above, I have a fix already. Will push on monday.
ivankelly commentedon Apr 3, 2020
Also, for clarity, it's not data loss broken really. It's more an availability issue.
eolivelli commentedon Dec 2, 2020
This issue has been fixed with BK 4.11